'main': Honour the MULTIOS option when applying the 'globbing' style.

Fixes #583.
This commit is contained in:
Daniel Shahaf
2020-03-17 03:31:32 +00:00
parent 61945185ff
commit 2339ee33b9
4 changed files with 83 additions and 1 deletions

View File

@@ -1257,7 +1257,9 @@ _zsh_highlight_main_highlighter_highlight_argument()
fi
;|
*)
if $highlight_glob && [[ ${arg[$i]} =~ ^[*?] || ${arg:$i-1} =~ ^\<[0-9]*-[0-9]*\> ]]; then
if $highlight_glob &&
[[ $zsyh_user_options[multios] == on || $in_redirection -eq 0 ]] &&
[[ ${arg[$i]} =~ ^[*?] || ${arg:$i-1} =~ ^\<[0-9]*-[0-9]*\> ]]; then
highlights+=($(( start_pos + i - 1 )) $(( start_pos + i + $#MATCH - 1)) globbing)
(( i += $#MATCH - 1 ))
path_eligible=0