config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 0dd451f19b336d2b383804fe93dfcf8857584527
parent 76d4c522ce1c0d731a68eae8822b95009ac793af
Author: jacob@nzxt <jacobouno@protonmail.com>
Date:   Tue, 14 Apr 2020 09:46:34 -0700

fix t function, format a all functions

Diffstat:
Maliases/.aliases | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/aliases/.aliases b/aliases/.aliases @@ -57,22 +57,22 @@ alias pacman="pacman-wrapper" ## one-line functions # delay execution of command by input * 60 seconds (must quote command) -t(){sleep $(calc -d "$1" \* 60); $2 ;} +t() { sleep $(calc -d "$1" \* 60); $2 ;} # start tmux automaticly on ssh -ssh(){ /usr/bin/ssh -t "$@" "tmux a || tmux new" ;} +ssh() { /usr/bin/ssh -t "$@" "tmux a || tmux new" ;} ## multi-line functions # get working directory -wd(){ +wd() { local home="$(printf $HOME | sed -E 's/\//\\\//g')" pwd | sed "s/$home/~/g" } # find and edit -fe(){ +fe() { if [ -d "$1" ]; then printf "searching '$1' for '$2'\n" find "$1" -name "$2" -exec "$EDITOR" '{}' \; 2>/dev/null @@ -83,7 +83,7 @@ fi } # try connecting to host -is_up(){ +is_up() { if [ "$( ping -c 1 -W 1.2 "$1" | tail -n 2 | head -n 1 | cut -d ',' -f 2 | awk '{print $1}' )" -ne 0 ]; then printf "$1 is up.\n" else @@ -92,7 +92,7 @@ is_up(){ } # open note for the day -daily(){ +daily() { time="$(date +%H%M)" # counts as the previous day until six @@ -144,7 +144,7 @@ wm_class() { ## history functions # history search -hs(){ +hs() { if [ -n "$2"]; then fc -n -l 0 | grep "$1" | tail else @@ -153,7 +153,7 @@ hs(){ } # repeat -r(){ +r() { if [ -z "$1" ]; then fc -s else @@ -162,7 +162,7 @@ r(){ } # repeat edit -re(){ +re() { if [ -z "$1" ]; then fc -e "$EDITOR" else