Skip to content

Commit e165f18

Browse files
committed
'main': Fix a bug manifesting under zsh 5.2 and older.
The escaped caret was taken for a negated character class. This caused test-data/arith1.zsh to XPass: the arithmetic expansion was consumed by the 'while' loop.
1 parent d237a60 commit e165f18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

highlighters/main/main-highlighter.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ _zsh_highlight_main_highlighter_highlight_argument()
12431243
# multiplications from being highlighted as globbing (issue #607,
12441244
# test-data/arith1.zsh)
12451245
fi
1246-
while [[ $arg[i+1] == [\^=~#+] ]]; do
1246+
while [[ $arg[i+1] == [=~#+'^'] ]]; do
12471247
(( i += 1 ))
12481248
done
12491249
if [[ $arg[i+1] == [*@#?$!-] ]]; then

0 commit comments

Comments
 (0)