mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
'main': Use a more robust way of testing for $parameters' availability.
This commit is contained in:
parent
62019eabb7
commit
caa727f9ac
1 changed files with 1 additions and 1 deletions
|
|
@ -509,7 +509,7 @@ _zsh_highlight_highlighter_main_paint()
|
||||||
elif [[ $arg[1] == '$' ]]; then
|
elif [[ $arg[1] == '$' ]]; then
|
||||||
parameter_name=${arg:1}
|
parameter_name=${arg:1}
|
||||||
fi
|
fi
|
||||||
if [[ $res == none ]] && (( ${+parameters} )) &&
|
if [[ $res == none ]] && zmodload -e zsh/parameter &&
|
||||||
[[ ${parameter_name} =~ ^([A-Za-z_][A-Za-z0-9_]*|[0-9]+)$ ]] &&
|
[[ ${parameter_name} =~ ^([A-Za-z_][A-Za-z0-9_]*|[0-9]+)$ ]] &&
|
||||||
(( ${+parameters[${MATCH}]} ))
|
(( ${+parameters[${MATCH}]} ))
|
||||||
then
|
then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue