*highlight: Correct order of checks in *-main-type

This commit is contained in:
Sebastian Gniazdowski 2016-11-02 09:42:31 +01:00
parent 1c56551a67
commit ee30daa40b

View file

@ -122,14 +122,14 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
[[ -z "$REPLY" ]] && { [[ -z "$REPLY" ]] && {
if zmodload -e zsh/parameter; then if zmodload -e zsh/parameter; then
if (( $+commands[(e)$1] )); then if (( $+aliases[(e)$1] )); then
REPLY=command
elif (( $+builtins[(e)$1] )); then
REPLY=builtin
elif (( $+aliases[(e)$1] )); then
REPLY=alias REPLY=alias
elif (( $+functions[(e)$1] )); then elif (( $+functions[(e)$1] )); then
REPLY=function REPLY=function
elif (( $+builtins[(e)$1] )); then
REPLY=builtin
elif (( $+commands[(e)$1] )); then
REPLY=command
elif (( $+saliases[(e)${1##*.}] )); then elif (( $+saliases[(e)${1##*.}] )); then
REPLY='suffix alias' REPLY='suffix alias'
elif (( $reswords[(Ie)$1] )); then elif (( $reswords[(Ie)$1] )); then