mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-02-06 09:55:31 +08:00
'main': Check cheaper conditions first.
This commit is contained in:
parent
1d76c0be32
commit
f284041305
@ -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'
|
||||||
|
Loading…
Reference in New Issue
Block a user