mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
sudo: Flag an error when a required argument is missing.
This commit is contained in:
parent
9cb87473cc
commit
2f05620b19
2 changed files with 9 additions and 3 deletions
|
|
@ -32,7 +32,7 @@ ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=$unused_highlight
|
|||
# * -i (no argument)
|
||||
# * -C3 (pasted argument)
|
||||
# * -u otheruser (non-pasted argument)
|
||||
BUFFER='sudo -C3 -u otheruser -i ls /; sudo ;'
|
||||
BUFFER='sudo -C3 -u otheruser -i ls /; sudo ; sudo -u ;'
|
||||
|
||||
expected_region_highlight=(
|
||||
"1 4 $ZSH_HIGHLIGHT_STYLES[precommand]" # sudo
|
||||
|
|
@ -43,4 +43,5 @@ expected_region_highlight=(
|
|||
"26 27 $ZSH_HIGHLIGHT_STYLES[command]" # ls
|
||||
"29 29 $ZSH_HIGHLIGHT_STYLES[path]" # /
|
||||
"37 37 $ZSH_HIGHLIGHT_STYLES[unknown-token]" # ;, error because empty command
|
||||
"47 47 $ZSH_HIGHLIGHT_STYLES[unknown-token]" # ;, error because incomplete command
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue