Fix syntax error with zsh-5.0.5-dev-1 and older.
zsh prior to workers/32609 (commit 9d47e8398d299e53ffe4e7ddf3731d2fedae9948) does not support the (-n)-less «[[ $var ]]» syntax. Fixes zsh-users/zsh-syntax-highlighting#225.
This commit is contained in:
parent
afa6bb3882
commit
8ab8c815ec
@ -194,7 +194,7 @@ _zsh_highlight_main_highlighter()
|
||||
((end_pos=$start_pos+${#arg}))
|
||||
fi
|
||||
|
||||
if [[ ${interactive_comments+'set'} && $arg[1] == $histchars[3] ]]; then
|
||||
if [[ -n ${interactive_comments+'set'} && $arg[1] == $histchars[3] ]]; then
|
||||
if [[ $this_word == *(':regular:'|':start:')* ]]; then
|
||||
style=$ZSH_HIGHLIGHT_STYLES[comment]
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user