main: alias style overrides precommand style

This commit is contained in:
Matthew Martin 2018-10-01 11:56:08 -04:00
parent c138123397
commit e3edddd8ec
2 changed files with 2 additions and 2 deletions

View File

@ -650,7 +650,7 @@ _zsh_highlight_main_highlighter_highlight_list()
next_word=':start:'
elif [[ $this_word == *':start:'* ]] && (( in_redirection == 0 )); then # $arg is the command word
if (( ${+precommand_options[$arg]} )) && _zsh_highlight_main__is_runnable $arg; then
style=precommand
[[ $res != alias ]] && style=precommand
flags_with_argument=${precommand_options[$arg]%:*}
flags_sans_argument=${precommand_options[$arg]#*:}
next_word=${next_word//:regular:/}

View File

@ -31,6 +31,6 @@ alias x=command
BUFFER='x ls'
expected_region_highlight=(
"1 1 precommand" # x
"1 1 alias" # x
"3 4 command" # ls
)