'main': Do not expand special parameters. Fixes #489.

Adding «(e)» to the first subscript is a no-op: the subscript is known
to be safe due to the previous line.
This commit is contained in:
Daniel Shahaf 2018-01-20 00:36:16 +00:00
parent f16e858f0c
commit 8046c33b54

View File

@ -493,7 +493,7 @@ _zsh_highlight_highlighter_main_paint()
local MATCH; integer MBEGIN MEND
if [[ $res == none ]] && (( ${+parameters} )) &&
[[ ${arg[1]} == \$ ]] && [[ ${arg:1} =~ ^([A-Za-z_][A-Za-z0-9_]*|[0-9]+)$ ]] &&
(( ${+parameters[${MATCH}]} ))
(( ${+parameters[(e)${MATCH}]} )) && [[ ${parameters[(e)$MATCH]} != *special* ]]
then
_zsh_highlight_main__type ${(P)MATCH}
res=$REPLY