Subject: Re: unset "hash[key]" isn't matched with what "key" may be
From: Bart Schaefer <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Tue, 9 Feb 2016 10:07:02 -0800
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Feb 9,  4:19pm, Peter Stephenson wrote:
}
} getindex() does parse_subcript(); later getarg() looks for tokens and
} if it finds any calls singsub(). "unset" doesn't have any of this
} sophistication.

Hmm.  For a normal array:

torch% x=3
torch% typeset 'foo[$x]'=1
torch% typeset -p foo
typeset -a foo=( '' '' 1 )
torch% unset 'foo[$x]'			<-- Note
torch% typeset -p foo
typeset -a foo=( '' '' '' )
torch% 

It didn't actually delete the element, but it did *something*.  (*Should*
it delete the element, as long as we're considering messing with this?)