mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
command word: Protect against the case that the command word starts with a minus.
This commit is contained in:
parent
07fd773d7e
commit
e138cfd765
1 changed files with 1 additions and 1 deletions
|
|
@ -159,7 +159,7 @@ _zsh_highlight_main_highlighter()
|
|||
else
|
||||
_zsh_highlight_main_highlighter_expand_path $arg
|
||||
local expanded_arg="$REPLY"
|
||||
local res="$(LC_ALL=C builtin type -w ${expanded_arg} 2>/dev/null)"
|
||||
local res="$(LC_ALL=C builtin type -w -- ${expanded_arg} 2>/dev/null)"
|
||||
case $res in
|
||||
*': reserved') style=$ZSH_HIGHLIGHT_STYLES[reserved-word];;
|
||||
*': suffix alias')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue