Fix tokens followed by commands and aliases bug (thanks to hchbaw)
This commit is contained in:
parent
a2f022c70f
commit
a56a085ca7
@ -57,3 +57,5 @@ Re-open your terminal, or just reload it to take changes into account:
|
||||
* [Andreas Jaggi](http://github.com/x-way)
|
||||
* [Wayne Davison](http://github.com/WayneD)
|
||||
* [Suraj N. Kurapati](http://github.com/sunaku)
|
||||
* [Takeshi Banse](http://github.com/hchbaw)
|
||||
|
||||
|
2
zsh-syntax-highlighting.zsh
Normal file → Executable file
2
zsh-syntax-highlighting.zsh
Normal file → Executable file
@ -111,7 +111,7 @@ _zsh_highlight-zle-buffer() {
|
||||
case $res in
|
||||
*': reserved') style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[reserved-word];;
|
||||
*': alias') style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[alias]
|
||||
local aliased_command=${$(alias $arg)#*=}
|
||||
local aliased_command=${"$(alias $arg)"#*=}
|
||||
[[ ${${ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS[(r)$aliased_command]:-}:+yes} = 'yes' ]] && ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS+=($arg)
|
||||
;;
|
||||
*': builtin') style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[builtin];;
|
||||
|
Loading…
Reference in New Issue
Block a user