mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
Highlight quoted command words correctly.
Fixes zsh-users/zsh-syntax-highlighting#147.
This commit is contained in:
parent
7b4598a764
commit
800158745a
2 changed files with 37 additions and 1 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue