'main': Fix issue #577.

This commit is contained in:
Daniel Shahaf 2020-02-28 22:22:35 +00:00
parent 9880276756
commit edfc7dfd9b
2 changed files with 3 additions and 4 deletions

View file

@ -744,7 +744,8 @@ _zsh_highlight_main_highlighter_highlight_list()
elif ! (( in_redirection)) && [[ $this_word == *':always:'* && $arg == 'always' ]]; then
# try-always construct
style=reserved-word # de facto a reserved word, although not de jure
next_word=':start:' # only left brace is allowed, apparently
highlight_glob=true
next_word=':start::start_of_pipeline:' # only left brace is allowed, apparently
elif ! (( in_redirection)) && [[ $this_word == *':start:'* ]]; then # $arg is the command word
if (( ${+precommand_options[$arg]} )) && _zsh_highlight_main__is_runnable $arg; then
style=precommand

View file

@ -40,8 +40,6 @@ expected_region_highlight=(
'26 26 reserved-word' # {
'28 31 builtin' # echo
'33 33 default' # *
'33 33 globbing "issue #577"' # *
'33 33 globbing' # *
'35 35 reserved-word' # }
)
expected_mismatch="expected default+globbing, observed default"