Merge remote-tracking branch 'upstream/pr/179'
* upstream/pr/179: Don't parse first word of array assignment as command
This commit is contained in:
@@ -160,7 +160,11 @@ _zsh_highlight_main_highlighter()
|
||||
*': hashed') style=$ZSH_HIGHLIGHT_STYLES[hashed-command];;
|
||||
*) if _zsh_highlight_main_highlighter_check_assign; then
|
||||
style=$ZSH_HIGHLIGHT_STYLES[assign]
|
||||
new_expression=true
|
||||
if [[ $arg[-1] != '(' ]]; then
|
||||
# assignment to a scalar parameter.
|
||||
# (For array assignments, the command doesn't start until the ")" token.)
|
||||
new_expression=true
|
||||
fi
|
||||
elif _zsh_highlight_main_highlighter_check_path; then
|
||||
style=$ZSH_HIGHLIGHT_STYLES[path]
|
||||
elif [[ $arg[0,1] == $histchars[0,1] || $arg[0,1] == $histchars[2,2] ]]; then
|
||||
|
||||
Reference in New Issue
Block a user