'main': Disable a lint warning when env(1) was followed by a pipe.

Fixes #797.
This commit is contained in:
Daniel Shahaf
2021-03-01 20:21:39 +00:00
parent 5eb494852e
commit 205bc7ea19
2 changed files with 40 additions and 2 deletions

View File

@@ -916,8 +916,8 @@ _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
if [[ $arg == 'exec' || $arg == 'env' ]]; then
# To allow "exec 2>&1;" and "env | grep" where there's no command word
next_word+=':regular:'
fi
else