'main': Support the non-precommand flags of sudo(8) and ssh-agent(1).
Uses the infrastructure added in the previous commit. Fixes #678.
This commit is contained in:
parent
c73153c6e8
commit
20d250d618
|
@ -329,15 +329,15 @@ _zsh_highlight_highlighter_main_paint()
|
|||
'doas' aCu:Lns # as of OpenBSD's doas(1) dated September 4, 2016
|
||||
'nice' n: # as of current POSIX spec
|
||||
'pkexec' '' # doesn't take short options; immune to #121 because it's usually not passed --option flags
|
||||
# Argumentless flags that can't be followed by a command: -e -h -K -k -V -v
|
||||
'sudo' Cgprtu:AEHPSbilns # as of sudo 1.8.21p2
|
||||
# Not listed: -h, which has two different meanings.
|
||||
'sudo' Cgprtu:AEHPSbilns:eKkVv # as of sudo 1.8.21p2
|
||||
'stdbuf' ioe:
|
||||
'eatmydata' ''
|
||||
'catchsegv' ''
|
||||
'nohup' ''
|
||||
'setsid' :wc
|
||||
# As of OpenSSH 8.1p1; -k is deliberately left out since it may not be followed by a command
|
||||
'ssh-agent' aEPt:csDd
|
||||
# As of OpenSSH 8.1p1
|
||||
'ssh-agent' aEPt:csDd:k
|
||||
# suckless-tools v44
|
||||
# Argumentless flags that can't be followed by a command: -v
|
||||
'tabbed' gnprtTuU:cdfhs
|
||||
|
|
|
@ -35,5 +35,5 @@ BUFFER='sudo -e /does/not/exist'
|
|||
expected_region_highlight=(
|
||||
'1 4 precommand' # sudo
|
||||
'6 7 single-hyphen-option' # -e
|
||||
'9 23 default "issue #678"' # /does/not/exist
|
||||
'9 23 default' # /does/not/exist
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue