Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: pws-19: comparing (k) and (I) for hashes
- X-seq: zsh-workers 6348
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: pws-19: comparing (k) and (I) for hashes
- Date: Tue, 25 May 1999 16:55:53 +0200
- In-reply-to: ""Andrej Borsenkow""'s message of "Tue, 25 May 1999 16:23:50 DFT." <014401bea6a9$71f5f1a0$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
"Andrej Borsenkow" wrote:
> >From manual I got the impression, that ${(k)...} and ${...[(I)...]} do the
> same - both return the keys of matching elements. Cf. (I) description:
>
> `I'
> like ``i', but gives the index of the last match, or all possible
> matching keys in an associative array.
Actually, I just specifies that it should search the keys (which correspond
to the index of an ordinary array). k and v still determine what is
returned, except that for I and i the default is to show the key instead of
the value.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author