From 1bb83f18cd5bf5a739f60141e62b63c2e9ba6036 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 22 Apr 2023 14:52:57 +0200 Subject: changed fhome to goo --- config/essentials/zsh/functions.zsh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'config/essentials/zsh/functions.zsh') diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 1dc31b0..b80013b 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -10,21 +10,24 @@ vimh() { vim -c "help $1" -c 'call feedkeys("\o")' } nnn() { test -z "$NNNLVL" && /usr/bin/nnn "$@" || exit } ranger() { test -z "$RANGER_LEVEL" && /usr/bin/ranger "$@" || exit } -# googoo +# googoo aliases +ff () { goo f $1 | fzf } +fd () { goo d $1 | fzf } +fdf () { goo f $1 | fzf | xargs dirname } o () { - f="$(fhome f ${1:-$HOME} | fzf)" + f="$(ff $1)" test "$1" && shift test -n "$f" && $EDITOR $@ "$f" } go () { - d="$(fhome d ${1:-$HOME} | fzf)" + d="$(fd $1)" test -d "$d" && cd "$d" } ogo () { - d="$(fhome f ${1:-$HOME} | fzf | xargs dirname)" + d="$(fdf $1)" test -d "$d" && cd "$d" } -- cgit v1.2.3