Fix exclusions

This commit is contained in:
Ajeet D'Souza 2025-05-05 22:44:02 -07:00
parent 793f1e46ac
commit 73599f995b
1 changed files with 4 additions and 2 deletions

View File

@ -41,13 +41,15 @@ else\
else if ("$#__zoxide_args" == 1 && -d "$__zoxide_args[1]") then\
cd "$__zoxide_args[1]"\
else\
set __zoxide_result = "`zoxide query -- $__zoxide_args`" && cd "$__zoxide_result"\
set __zoxide_pwd = `{{ pwd_cmd }}`\
set __zoxide_result = "`zoxide query --exclude '"'"'$__zoxide_pwd'"'"' -- $__zoxide_args`" && cd "$__zoxide_result"\
endif\
endif'
# Jump to a directory using interactive search.
alias __zoxide_zi 'set __zoxide_args = (\!*)\
set __zoxide_result = "`zoxide query --interactive -- $__zoxide_args`" && cd "$__zoxide_result"'
set __zoxide_pwd = `{{ pwd_cmd }}`\
set __zoxide_result = "`zoxide query --exclude '"'"'$__zoxide_pwd'"'"' --interactive -- $__zoxide_args`" && cd "$__zoxide_result"'
{{ section }}
# Commands for zoxide. Disable these using --no-cmd.