main: Use =~ for globbing test

This will set MATCH as needed for the next commit
This commit is contained in:
Matthew Martin 2018-01-18 20:08:14 -06:00
parent c1a048a084
commit 604075aa90

View File

@ -840,7 +840,7 @@ _zsh_highlight_main_highlighter_highlight_argument()
(( i += 1 ))
fi;;
*)
if $highlight_glob && [[ ${arg[$i]} == [*?] || ${arg:$i-1} == \<[0-9]#-[0-9]#\>* ]]; then
if $highlight_glob && [[ ${arg[$i]} =~ ^[*?] || ${arg:$i-1} =~ ^\<[0-9]*-[0-9]*\> ]]; then
(( i += $#MATCH - 1 ))
base_style=globbing
path_eligible=0