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: Sun, 7 Feb 2016 19:08:22 +0000
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Sun, 7 Feb 2016 15:16:05 +0100
Sebastian Gniazdowski <[email-masked]> wrote:
> 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]"

Not sure what you're doing, but it's apparently not equivalent to the
following, which appears to work.  There may be some relevant option,
I suppose.

% i='${(k)functions}'
% typeset -A hash
% hash[$i]=1
% print ${(kv)hash}
${(k)functions} 1
% unset "hash[$i]"
% print ${(kv)hash}
<this line intentionally left blank>

PWS