From d3374ddd385dc794e9d57f775baebd1aa8066191 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 28 Mar 2023 11:30:00 +0200 Subject: use one fhome script instead of three one liner scripts --- config/essentials/zsh/functions.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 4833576..637df07 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -13,18 +13,18 @@ ranger() { test -z "$RANGER_LEVEL" && /usr/bin/ranger "$@" || exit } # googoo o () { - f="$(fzffile $1)" - test "$#" -gt 0 && shift + f="$(fhome f ${1:-$HOME} | fzf)" + test "$1" && shift test -n "$f" && $EDITOR $@ "$f" } go () { - d="$(fzfdir $1)" + d="$(fhome d ${1:-$HOME} | fzf)" test -d "$d" && cd "$d" } ogo () { - d="$(fzfdirfile $1)" + d="$(fhome f ${1:-$HOME} | fzf | xargs dirname)" test -d "$d" && cd "$d" } -- cgit v1.2.3