Fix for aliases (from zsh-users)
http://www.zsh.org/mla/users/2011/msg00005.html
This commit is contained in:
parent
77ff47dc27
commit
a640bb8b96
@ -328,7 +328,7 @@ _zsh_highlight-zle-buffer() {
|
|||||||
case $res in
|
case $res in
|
||||||
*': reserved') style=$ZSH_HIGHLIGHT_STYLES[reserved-word];;
|
*': reserved') style=$ZSH_HIGHLIGHT_STYLES[reserved-word];;
|
||||||
*': alias') style=$ZSH_HIGHLIGHT_STYLES[alias]
|
*': alias') style=$ZSH_HIGHLIGHT_STYLES[alias]
|
||||||
local aliased_command=${"$(alias $arg)"#*=}
|
local aliased_command="${"$(alias $arg)"#*=}"
|
||||||
if [[ ${${ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS[(r)$aliased_command]:-}:+yes} = 'yes' && ${${ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS[(r)$arg]:-}:+yes} != 'yes' ]]; then
|
if [[ ${${ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS[(r)$aliased_command]:-}:+yes} = 'yes' && ${${ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS[(r)$arg]:-}:+yes} != 'yes' ]]; then
|
||||||
ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS+=($arg)
|
ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS+=($arg)
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user