main: Use unknown-token when the token type is unknown

This commit is contained in:
Matthew Martin 2018-10-01 12:23:47 -04:00
parent 4748f9bd3d
commit b6e0aeb380

View File

@ -544,7 +544,7 @@ _zsh_highlight_main_highlighter_highlight_list()
if (( insane_alias )); then if (( insane_alias )); then
style=unknown-token style=unknown-token
# Calling 'type' again; since __type memoizes the answer, this call is just a hash lookup. # Calling 'type' again; since __type memoizes the answer, this call is just a hash lookup.
elif _zsh_highlight_main__type "$arg" && [[ $REPLY == 'none' ]]; then elif ! _zsh_highlight_main__type "$arg" || [[ $REPLY == 'none' ]]; then
style=unknown-token style=unknown-token
else else
# The common case. # The common case.