Skip to content

Commit 8ab8c81

Browse files
committed
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 #225.
1 parent afa6bb3 commit 8ab8c81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

highlighters/main/main-highlighter.zsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ _zsh_highlight_main_highlighter()
194194
((end_pos=$start_pos+${#arg}))
195195
fi
196196

197-
if [[ ${interactive_comments+'set'} && $arg[1] == $histchars[3] ]]; then
197+
if [[ -n ${interactive_comments+'set'} && $arg[1] == $histchars[3] ]]; then
198198
if [[ $this_word == *(':regular:'|':start:')* ]]; then
199199
style=$ZSH_HIGHLIGHT_STYLES[comment]
200200
else

0 commit comments

Comments
 (0)