From a56a085ca7267f36bec3816c554bfb19040a2569 Mon Sep 17 00:00:00 2001 From: Julien Nicoulaud Date: Fri, 31 Dec 2010 02:07:24 +0100 Subject: [PATCH] Fix tokens followed by commands and aliases bug (thanks to hchbaw) --- README.md | 2 ++ zsh-syntax-highlighting.zsh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 zsh-syntax-highlighting.zsh diff --git a/README.md b/README.md index 6f2a580..f4085ef 100644 --- a/README.md +++ b/README.md @@ -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) + diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh old mode 100644 new mode 100755 index 49811ba..11c1ccc --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -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];;