File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function __z -d "Jump to a recent directory."
14
14
function __z_legacy_escape_regex
15
15
# taken from escape_string_pcre2 in fish
16
16
# used to provide compatibility with fish 2
17
- for c in (string split ' ' $argv )
17
+ for c in (string split -- ' ' $argv )
18
18
if contains $c (string split ' ' ' .^$*+()?[{}\\ |-]' )
19
19
printf \\
20
20
end
@@ -123,15 +123,15 @@ function __z -d "Jump to a recent directory."
123
123
for arg in $argv
124
124
set -l escaped $arg
125
125
if string escape --style =regex ' ' > /dev/null 2>&1 # use builtin escape if available
126
- set escaped (string escape --style =regex $escaped )
126
+ set escaped (string escape --style =regex -- $escaped )
127
127
else
128
128
set escaped (__z_legacy_escape_regex $escaped )
129
129
end
130
130
# Need to escape twice, see https://www.math.utah.edu/docs/info/gawk_5.html#SEC32
131
- set escaped (string replace --all \\ \\\\ $escaped )
131
+ set escaped (string replace --all -- \\ \\\\ $escaped )
132
132
set qs $qs $escaped
133
133
end
134
- set -l q (string join ' .*' $qs )
134
+ set -l q (string join -- ' .*' $qs )
135
135
136
136
if set -q _flag_list
137
137
# Handle list separately as it can print common path information to stderr
You can’t perform that action at this time.
0 commit comments