main: Change conditional to a switch

Prepares for next commit. No functional change.
This commit is contained in:
Matthew Martin 2018-03-14 22:46:49 -05:00
parent beae08776a
commit 73640b79ea

View File

@ -848,14 +848,16 @@ _zsh_highlight_main_highlighter_highlight_argument()
local -a match mbegin mend local -a match mbegin mend
local MATCH; integer MBEGIN MEND local MATCH; integer MBEGIN MEND
if [[ $arg[1] == - ]]; then case "$arg[1]" in
if [[ $arg[2] == - ]]; then '-')
base_style=double-hyphen-option if [[ $arg[2] == - ]]; then
else base_style=double-hyphen-option
base_style=single-hyphen-option else
fi base_style=single-hyphen-option
path_eligible=0 fi
fi path_eligible=0
;;
esac
for (( i = 1 ; i <= end_pos - start_pos ; i += 1 )); do for (( i = 1 ; i <= end_pos - start_pos ; i += 1 )); do
case "$arg[$i]" in case "$arg[$i]" in