hlissner / zsh-autopair

Auto-close and delete matching delimiters in zsh
MIT License
509 stars 37 forks source link

Support older Zsh (version <= 5.0.4) by using [[ -n ... ]] #20

Closed psprint closed 5 years ago

psprint commented 5 years ago

Hello! The syntax [[ $var ]] is supported starting from Zsh 5.0.6, older versions return parse error. I've replaced the conditions with [[ -n $var ]], and everything seems to work fine.

I'm doing this PR for Hacktoberfest, I hope you find it useful (this is needed by the Hactoberfest's rules).

hlissner commented 5 years ago

Sorry for the late response. Thanks for this PR, I wasn't sure when the new syntax was introduced.