From 88d494fc2dcace7768984a23082ccbcd4a2b7afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Sat, 16 Mar 2024 07:01:42 +0100 Subject: [PATCH] Fix handling of directories that look like flags in fish (#605) --- templates/fish.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/fish.txt b/templates/fish.txt index 9a51f6d3..9ab49839 100644 --- a/templates/fish.txt +++ b/templates/fish.txt @@ -82,7 +82,7 @@ function __zoxide_z __zoxide_cd - else if test $argc -eq 1 -a -d $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 else set -l result (command zoxide query --exclude (__zoxide_pwd) -- $argv)