'main': Fix highlighting of null execs.

Fixes #676.
This commit is contained in:
Daniel Shahaf
2020-03-16 21:50:04 +00:00
parent f56e3fad23
commit 3174e375f4
3 changed files with 8 additions and 1 deletions
+4
View File
@@ -824,6 +824,10 @@ _zsh_highlight_main_highlighter_highlight_list()
next_word=${next_word//:regular:/}
next_word+=':sudo_opt:'
next_word+=':start:'
if [[ $arg == 'exec' ]]; then
# To allow "exec 2>&1;" where there's no command word
next_word+=':regular:'
fi
else
case $res in
reserved) # reserved word
+1 -1
View File
@@ -34,5 +34,5 @@ expected_region_highlight=(
'1 4 precommand' # exec
'6 6 redirection' # >
'7 15 path' # /dev/null
'16 16 commandseparator "issue #676"' # ;
'16 16 commandseparator' # ;
)