Skip to content

Commit 77c6bf2

Browse files
committed
'main': precommands: Remove argumentless options that can't be followed by a command word.
Suggested-by: Matthew Martin (in e2e97dd#r36941988)
1 parent 27e4789 commit 77c6bf2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

highlighters/main/main-highlighter.zsh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ _zsh_highlight_highlighter_main_paint()
315315
'doas' aCu:Lns # as of OpenBSD's doas(1) dated September 4, 2016
316316
'nice' n: # as of current POSIX spec
317317
'pkexec' '' # doesn't take short options; immune to #121 because it's usually not passed --option flags
318-
'sudo' Cgprtu:AEHKPSVbhiklnsv # as of sudo 1.8.21p2
318+
# Argumentless flags that can't be followed by a command: -e -h -K -k -V -v
319+
'sudo' Cgprtu:AEHPSbilns # as of sudo 1.8.21p2
319320
'stdbuf' ioe:
320321
'eatmydata' ''
321322
'catchsegv' ''
@@ -324,7 +325,8 @@ _zsh_highlight_highlighter_main_paint()
324325
# As of OpenSSH 8.1p1; -k is deliberately left out since it may not be followed by a command
325326
'ssh-agent' aEPt:csDd
326327
# suckless-tools v44
327-
'tabbed' gnprtTuU:cdfhsv
328+
# Argumentless flags that can't be followed by a command: -v
329+
'tabbed' gnprtTuU:cdfhs
328330
)
329331

330332
if [[ $zsyh_user_options[ignorebraces] == on || ${zsyh_user_options[ignoreclosebraces]:-off} == on ]]; then

0 commit comments

Comments
 (0)