diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 9454a2e..dbb0df9 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -180,7 +180,7 @@ _zsh_highlight_main__type() { if (( $+aliases[(e)$1] )); then may_cache=0 fi - if (( ${+galiases[(e)$1]} )); then + if (( ${+galiases[(e)$1]} )) && (( aliases_allowed )); then REPLY='global alias' elif (( $+aliases[(e)$1] )) && (( aliases_allowed )); then REPLY=alias diff --git a/highlighters/main/test-data/parameter-to-global-alias.zsh b/highlighters/main/test-data/parameter-to-global-alias.zsh index 665b881..2c4b9bb 100644 --- a/highlighters/main/test-data/parameter-to-global-alias.zsh +++ b/highlighters/main/test-data/parameter-to-global-alias.zsh @@ -34,5 +34,5 @@ local s=x BUFFER=$'$s' expected_region_highlight=( - '1 2 unknown-token "fixed in the next commit"' # $s + '1 2 unknown-token' # $s )