From caa727f9ac1feef5730a06ad8a1427e171bc6c18 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 12 Jan 2018 13:49:03 +0000 Subject: [PATCH] 'main': Use a more robust way of testing for $parameters' availability. --- highlighters/main/main-highlighter.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 3871182..1e08f6b 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -509,7 +509,7 @@ _zsh_highlight_highlighter_main_paint() elif [[ $arg[1] == '$' ]]; then parameter_name=${arg:1} fi - if [[ $res == none ]] && (( ${+parameters} )) && + if [[ $res == none ]] && zmodload -e zsh/parameter && [[ ${parameter_name} =~ ^([A-Za-z_][A-Za-z0-9_]*|[0-9]+)$ ]] && (( ${+parameters[${MATCH}]} )) then