From 2dbcb575e5a5c7ba3fecbc59831b0d20cc7c397d Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Tue, 17 Nov 2015 19:40:58 +0000 Subject: [PATCH] internal: Document the ':regular' state. --- highlighters/main/main-highlighter.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 9e8f650..9192f90 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -156,7 +156,7 @@ _zsh_highlight_main_highlighter() # - :sudo_arg: The argument to a sudo leading-dash option that takes one, # when given as a separate word; i.e., "foo" in "-u foo" (two # words) but not in "-ufoo" (one word). - # - :regular: "Not a command word". + # - :regular: "Not a command word", and command delimiters are permitted. # Mainly used to detect premature termination of commands. # # When the kind of a word is not yet known, $this_word / $next_word may contain @@ -191,7 +191,10 @@ _zsh_highlight_main_highlighter() (( --in_redirection )) fi if (( in_redirection == 0 )); then + # Initialize $next_word to its default value. next_word=':regular:' + else + # Stall $next_word. fi # $already_added is set to 1 to disable adding an entry to region_highlight # for this iteration. Currently, that is done for "" and $'' strings,