config(fish): add fish completions for cli tools

This commit is contained in:
Prad Nukala committed 2026-07-16 16:58:06 -04:00
1 parent b1fb6ee6fb
commit 7db95c2076
48 files changed
+2241

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
function cd --description 'cd with zoxide fallback, else builtin cd'
if test (count $argv) -eq 0
builtin cd $HOME
else if test "$argv[1]" = '-'
builtin cd -
else if builtin cd $argv[1] 2>/dev/null
# exact path resolved, nothing else to do
else if type -q zoxide
set -l target (zoxide query -- $argv[1] 2>/dev/null)
if test -n "$target"
builtin cd $target
else
builtin cd $argv[1] # let builtin cd surface the real error
end
else
builtin cd $argv[1]
end
type -q zoxide; and zoxide add $PWD
end