summaryrefslogtreecommitdiff
path: root/config/essentials/zsh
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-03-28 11:30:00 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-03-28 11:30:00 +0200
commitd3374ddd385dc794e9d57f775baebd1aa8066191 (patch)
treef677cd4e9d2c48e351d28e56e96b1186c426e9f4 /config/essentials/zsh
parent91d62c119070a3bb3a92bf10accf827c5dc5d5c3 (diff)
use one fhome script instead of three one liner scripts
Diffstat (limited to 'config/essentials/zsh')
-rw-r--r--config/essentials/zsh/functions.zsh8
1 files changed, 4 insertions, 4 deletions
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"
}