Subject: Re: unset "hash[key]" isn't matched with what "key" may be
From: Peter Stephenson <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Tue, 09 Feb 2016 16:19:04 +0000
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Tue, 09 Feb 2016 07:50:50 -0800
Bart Schaefer <[email-masked]> wrote:
> So what magic makes this work for typeset?
> 
> torch% typeset -A foo
> torch% x='['
> torch% typeset "foo[$x]"     
> zsh: not an identifier: foo[[]
> torch% typeset 'foo[$x]'		<-- note here

getindex() does parse_subcript(); later getarg() looks for tokens and if
it finds any calls singsub().  "unset" doesn't have any of this
sophistication.

pws