mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
'main': The word after 'sudo' is only a non-command word if it is an option.
This commit is contained in:
parent
179b8e753f
commit
757d047f09
2 changed files with 5 additions and 1 deletions
|
|
@ -338,6 +338,9 @@ _zsh_highlight_main_highlighter()
|
|||
|
||||
# Parse the sudo command line
|
||||
if (( ! in_redirection )); then
|
||||
if [[ $this_word == *':sudo_opt:'* ]] && [[ $arg != -* ]]; then
|
||||
this_word=${this_word//:sudo_opt:/}
|
||||
fi
|
||||
if [[ $this_word == *':sudo_opt:'* ]]; then
|
||||
case "$arg" in
|
||||
# Flag that requires an argument
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue