Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: unset "hash[key]" isn't matched with what "key" may be
- X-seq: zsh-workers 37907
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: unset "hash[key]" isn't matched with what "key" may be
- Date: Sun, 7 Feb 2016 20:10:48 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=pMkQKSqoOmKJordxAXhfzOmSvrD/wazJfT3meOsA/+8=; b=eA0kc7nKXwJyG+thn0qppSIx+PzKdy5mPs5m/YkeYrr7YWWTcT+QfHqCu+y9Z09oN/ nhSyvdP9hCF98gLCs8mz6QQviSSgOh0u8ibS+xHSfFRRU+p7E7VnmHa8uiP4dsgItnoq TXkc8gq1sj4di2V2QTZ3c0gf3gWird19K6KtGDu6CCqQ8QGfhEHdcMW+hDIzkKbr6ATq JEKzPTXghvAKH5iO57E9zbAId4e/Ixdfx4QL278R4Bm3jVcKvkwIsY/LJflOYhLMUZ2e WaXc6tLl8mV81SudWHA7lV1fwpUtdCvuh0rKnTtrmOpohJVGExTmy5L+tAv0oxAOk748 KmxA==
- In-reply-to: <20160207190822.7ba8de0e@ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBXd-UGwM+_tRSwuw-WL154YaTys6-t3iuzfAsG-RC-YQ@mail.gmail.com> <20160207190822.7ba8de0e@ntlworld.com>
On 7 February 2016 at 20:08, Peter Stephenson
<p.w.stephenson@xxxxxxxxxxxx> wrote:
> On Sun, 7 Feb 2016 15:16:05 +0100
> Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> 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}'
Sorry, by:
>> where "func" is a hash and "$i" is ${(k)functions}. This worked, however this:
I meant that "$i" iterates over keys of $functions
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author