Fix handling of directories that look like flags in fish

This commit is contained in:
Anselm Schüler 2023-08-12 21:50:35 +02:00
parent 01da2dbff6
commit fda6d8a23f
No known key found for this signature in database
GPG Key ID: BA34EE1ABA3A0955
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ function __zoxide_z
__zoxide_cd - __zoxide_cd -
else if test $argc -eq 1 -a -d $argv[1] else if test $argc -eq 1 -a -d $argv[1]
__zoxide_cd $argv[1] __zoxide_cd $argv[1]
else if set -l result (string replace --regex $__zoxide_z_prefix_regex '' $argv[-1]); and test -n $result else if set -l result (string replace --regex -- $__zoxide_z_prefix_regex '' $argv[-1]); and test -n $result
__zoxide_cd $result __zoxide_cd $result
else else
set -l result (command zoxide query --exclude (__zoxide_pwd) -- $argv) set -l result (command zoxide query --exclude (__zoxide_pwd) -- $argv)