From c7369080269101cc557d1c95fe3417ea6e8a47be Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 10 Oct 2018 10:46:04 +0000 Subject: [PATCH] fixup! 'main': Don't highlight aliases in "fake" command word positions, such as 'sudo ls'. --- highlighters/main/main-highlighter.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index f3cfe43..d338408 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -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