'main': Highlight scalar assignments to argv

Assignments to positional parameters using scalar assignment syntax is
a feature: it is covered by upstream's test suite ("append to positional
parameter" in Test/A06assign.ztst).
This commit is contained in:
Daniel Shahaf
2016-06-03 02:44:38 +00:00
parent 14711a51f3
commit f4036a09ce
2 changed files with 37 additions and 1 deletions

View File

@@ -545,7 +545,8 @@ _zsh_highlight_main_highlighter()
_zsh_highlight_main_highlighter_check_assign()
{
setopt localoptions extended_glob
[[ $arg == [[:alpha:]_][[:alnum:]_]#(|\[*\])(|[+])=* ]]
[[ $arg == [[:alpha:]_][[:alnum:]_]#(|\[*\])(|[+])=* ]] ||
[[ $arg == [0-9]##(|[+])=* ]]
}
_zsh_highlight_main_highlighter_highlight_path_separators()