main: Change conditional to a switch
Prepares for next commit. No functional change.
This commit is contained in:
parent
beae08776a
commit
73640b79ea
@ -848,14 +848,16 @@ _zsh_highlight_main_highlighter_highlight_argument()
|
||||
local -a match mbegin mend
|
||||
local MATCH; integer MBEGIN MEND
|
||||
|
||||
if [[ $arg[1] == - ]]; then
|
||||
if [[ $arg[2] == - ]]; then
|
||||
base_style=double-hyphen-option
|
||||
else
|
||||
base_style=single-hyphen-option
|
||||
fi
|
||||
path_eligible=0
|
||||
fi
|
||||
case "$arg[1]" in
|
||||
'-')
|
||||
if [[ $arg[2] == - ]]; then
|
||||
base_style=double-hyphen-option
|
||||
else
|
||||
base_style=single-hyphen-option
|
||||
fi
|
||||
path_eligible=0
|
||||
;;
|
||||
esac
|
||||
|
||||
for (( i = 1 ; i <= end_pos - start_pos ; i += 1 )); do
|
||||
case "$arg[$i]" in
|
||||
|
Loading…
Reference in New Issue
Block a user