summaryrefslogtreecommitdiff
path: root/home-config/fish/functions/__zoxide_z.fish
diff options
context:
space:
mode:
Diffstat (limited to 'home-config/fish/functions/__zoxide_z.fish')
-rw-r--r--home-config/fish/functions/__zoxide_z.fish13
1 files changed, 13 insertions, 0 deletions
diff --git a/home-config/fish/functions/__zoxide_z.fish b/home-config/fish/functions/__zoxide_z.fish
new file mode 100644
index 0000000..bb24f69
--- /dev/null
+++ b/home-config/fish/functions/__zoxide_z.fish
@@ -0,0 +1,13 @@
1function __zoxide_z
2 set --local argc (count $argv)
3 if test $argc -eq 0
4 __zoxide_cd $HOME
5 else if test "$argv" = -
6 __zoxide_cd -
7 else if test $argc -eq 1 -a -d $argv[1]
8 __zoxide_cd $argv[1]
9 else
10 set --local result (command zoxide query --exclude (__zoxide_pwd) -- $argv)
11 and __zoxide_cd $result
12 end
13end