main: in arguments starting with %?, ? is not a glob

Fixes #596
This commit is contained in:
Matthew Martin 2019-01-06 22:22:13 -06:00
parent 3259fe338d
commit 1e34c4aa0b
2 changed files with 6 additions and 2 deletions

View File

@ -984,6 +984,11 @@ _zsh_highlight_main_highlighter_highlight_argument()
local MATCH; integer MBEGIN MEND
case "$arg[i]" in
'%')
if [[ $arg[i+1] == '?' ]]; then
(( i += 2 ))
fi
;;
'-')
if (( option_eligible )); then
if [[ $arg[i+1] == - ]]; then

View File

@ -30,9 +30,8 @@
BUFFER=$': %? %?foo'
expected_mismatch="fallout of issue #596"
expected_region_highlight=(
'1 1 builtin' # :
'3 4 default' # %?
'6 10 default "issue 596"' # %?foo
'6 10 default' # %?foo
)