diff options
-rw-r--r-- | config/essentials/zsh/functions.zsh | 14 |
1 files changed, 10 insertions, 4 deletions
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() |