'main': Check cheaper conditions first.

This commit is contained in:
Daniel Shahaf 2020-03-17 02:11:37 +00:00 committed by Daniel Shahaf
parent 1d76c0be32
commit f284041305

View File

@ -180,9 +180,9 @@ _zsh_highlight_main__type() {
if (( $+aliases[(e)$1] )); then if (( $+aliases[(e)$1] )); then
may_cache=0 may_cache=0
fi fi
if (( ${+galiases[(e)$1]} )) && (( aliases_allowed )); then if (( aliases_allowed )) && (( ${+galiases[(e)$1]} )); then
REPLY='global alias' REPLY='global alias'
elif (( $+aliases[(e)$1] )) && (( aliases_allowed )); then elif (( aliases_allowed )) && (( $+aliases[(e)$1] )) &&; then
REPLY=alias REPLY=alias
elif [[ $1 == *.* && -n ${1%.*} ]] && (( $+saliases[(e)${1##*.}] )); then elif [[ $1 == *.* && -n ${1%.*} ]] && (( $+saliases[(e)${1##*.}] )); then
REPLY='suffix alias' REPLY='suffix alias'