mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
sudo: Highlight an empty sudo; as an error.
The word following 'sudo' was considered :regular:, although it isn't.
This commit is contained in:
parent
86e9249709
commit
a3047a9121
2 changed files with 3 additions and 1 deletions
|
|
@ -206,6 +206,7 @@ _zsh_highlight_main_highlighter()
|
|||
elif [[ "$arg" = "sudo" ]]; then
|
||||
style=$ZSH_HIGHLIGHT_STYLES[precommand]
|
||||
next_word+=':sudo_opt:'
|
||||
next_word=${next_word//:regular:/}
|
||||
else
|
||||
_zsh_highlight_main_highlighter_expand_path $arg
|
||||
local expanded_arg="$REPLY"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue