Subject: unset "hash[key]" isn't matched with what "key" may be
From: Sebastian Gniazdowski <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Sun, 7 Feb 2016 15:16:05 +0100
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Hello,
I was testing following plugin:

https://github.com/hchbaw/opp.zsh

It creates functions with sophisticated names, like

opp+aB                               opp+aW
opp+a"                               opp+a'
opp+a(                               opp+a)
opp+a<                               opp+a>
opp+a[                               opp+a]

I had a loop in which I browsed $functions, setting:

                func[$i]=1

where "func" is a hash and "$i" is ${(k)functions}. This worked, however this:

                unset "func[$i]"

yielded:

-zplg-diff-functions:unset:36: func[opp+a\[]: invalid parameter name

Tried ${(q)i}, qq, qqq, qqqq.

Related code:

https://github.com/psprint/zplugin/commit/61a59fe0e2e367b3536fb028f4a36e9730322402

Best regards,
Sebastian Gniazdowski