Highlight quoted command words correctly.
Fixes zsh-users/zsh-syntax-highlighting#147.
This commit is contained in:
@@ -157,7 +157,7 @@ _zsh_highlight_main_highlighter()
|
||||
style=$ZSH_HIGHLIGHT_STYLES[precommand]
|
||||
sudo=true
|
||||
else
|
||||
local res="$(LC_ALL=C builtin type -w $arg 2>/dev/null)"
|
||||
local res="$(LC_ALL=C builtin type -w ${(Q)arg} 2>/dev/null)"
|
||||
case $res in
|
||||
*': reserved') style=$ZSH_HIGHLIGHT_STYLES[reserved-word];;
|
||||
*': suffix alias')
|
||||
|
||||
Reference in New Issue
Block a user