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) |  * [Andreas Jaggi](http://github.com/x-way) | ||||||
|  * [Wayne Davison](http://github.com/WayneD) |  * [Wayne Davison](http://github.com/WayneD) | ||||||
|  * [Suraj N. Kurapati](http://github.com/sunaku) |  * [Suraj N. Kurapati](http://github.com/sunaku) | ||||||
|  |  * [Takeshi Banse](http://github.com/hchbaw) | ||||||
|  | 
 | ||||||
|  |  | ||||||
|  | @ -111,7 +111,7 @@ _zsh_highlight-zle-buffer() { | ||||||
|       case $res in |       case $res in | ||||||
|         *': reserved')  style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[reserved-word];; |         *': reserved')  style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[reserved-word];; | ||||||
|         *': alias')     style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[alias] |         *': 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) |                         [[ ${${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];; |         *': builtin')   style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[builtin];; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue