Fix variable leakage into global namespace.
Similar to zsh-users/zsh-syntax-highlighting#97.
This commit is contained in:
		
							parent
							
								
									f78919d941
								
							
						
					
					
						commit
						d330b49b33
					
				|  | @ -147,7 +147,7 @@ _zsh_highlight_main_highlighter() | ||||||
|       style=$ZSH_HIGHLIGHT_STYLES[precommand] |       style=$ZSH_HIGHLIGHT_STYLES[precommand] | ||||||
|       sudo=true |       sudo=true | ||||||
|      else |      else | ||||||
|       res=$(LC_ALL=C builtin type -w $arg 2>/dev/null) |       local res=$(LC_ALL=C builtin type -w $arg 2>/dev/null) | ||||||
|       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] | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue