Merge pull request #131 from MarkLodato/array-assignments

Properly highlight array assignments
This commit is contained in:
Julien Nicoulaud 2013-11-19 11:40:29 -08:00
commit 8ac964186d

View File

@ -153,7 +153,7 @@ _zsh_highlight_main_highlighter()
_zsh_highlight_main_highlighter_check_assign() _zsh_highlight_main_highlighter_check_assign()
{ {
setopt localoptions extended_glob setopt localoptions extended_glob
[[ ${(Q)arg} == [[:alpha:]_]([[:alnum:]_])#=* ]] [[ $arg == [[:alpha:]_][[:alnum:]_]#(|\[*\])=* ]]
} }
# Check if the argument is a path. # Check if the argument is a path.