hlissner / zsh-autopair

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

Invalid local array initialization #5

Closed 1ambda closed 8 years ago

1ambda commented 8 years ago

I am using zsh 5.0.8 (x86_64-apple-darwin15.0) and load zsh-auto-pair with zplug.

The error message is,

/Users/1ambda/.zplug/repos/hlissner/zsh-autopair/autopair.zsh:150: unknown file attribute: )

The code in autopair.zsh line #150 should be

// before
local l=(')', '}', ']', '>')

// should be: http://stackoverflow.com/questions/14917501/local-arrays-in-zsh
local -a l
l=(')', '}', ']', '>')

Also, autopair.zsh line #40 should be modified, otherwise it will throw the ap-next-to-boundary-p:1: number expected error

// before
local groups=(all)

// should be: 
local -a groups
groups=(all)

Thanks for making the great terminal tool :)

hlissner commented 8 years ago

I've wondered how to fix that error before. Thanks for the help!