We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ac39b0 commit afa6bb3Copy full SHA for afa6bb3
highlighters/main/main-highlighter.zsh
@@ -131,6 +131,11 @@ _zsh_highlight_main_highlighter()
131
# - :regular: "Not a command word".
132
# Mainly used to detect premature termination of commands.
133
#
134
+ # When the kind of a word is not yet known, $this_word / $next_word may contain
135
+ # multiple states. For example, after "sudo -i", the next word may be either
136
+ # another --flag or a command name, hence the state would include both :start:
137
+ # and :sudo_opt:.
138
+ #
139
# The tokens are always added with both leading and trailing colons to serve as
140
# word delimiters (an improvised array); [[ $x == *:foo:* ]] and x=${x//:foo:/}
141
# will DTRT regardless of how many elements or repetitions $x has..
0 commit comments