From 0ea5e7a97b7ccba919d5c495e3e328b30cec9e03 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 15 Aug 2023 15:08:46 +0200 Subject: [functions.zsh] removed unecessary tests --- config/essentials/zsh/functions.zsh | 14 ++++++++++---- 1 file changed, 10 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 6c2437f..eb776f0 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -54,14 +54,20 @@ o() go() { _googoo_fzf_opt "$1" - d="$(goo d "$dest" | fzf $opt)" - test -d "$d" && cd "$d" + cd "$(goo d "$dest" | fzf $opt)" } ogo() { _googoo_fzf_opt "$1" - d="$(dirname "$(goo f "$dest")" | fzf $opt)" - test -d "$d" && cd "$d" + cd "$(dirname "$(goo f "$dest")" | fzf $opt)" +} +dgo() +{ + cd "$(goo d | fzf --filter "$@" | head -n 1)" +} +open() +{ + $EDITOR "$(goo f | fzf --filter "$@" | head -n 1)" } ipc() -- cgit v1.2.3