fixup! 'main': Don't highlight aliases in "fake" command word positions, such as 'sudo ls'.

This commit is contained in:
Daniel Shahaf 2018-10-10 10:46:04 +00:00
parent 00d9b7a6b2
commit c736908026

View File

@ -195,7 +195,7 @@ _zsh_highlight_main__type() {
# starts with an arithmetic expression [«((…))» as the first thing inside
# «$(…)»], which is area that has had some parsing bugs before 5.6
# (approximately).
REPLY="${$(:; (( aliases_allowed )) || unalias -- $1;LC_ALL=C builtin type -w -- $1 2>/dev/null)##*: }"
REPLY="${$(:; (( aliases_allowed )) || unalias -- $1 2>/dev/null; LC_ALL=C builtin type -w -- $1 2>/dev/null)##*: }"
if [[ $REPLY == 'alias' ]]; then
may_cache=0
fi