Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Backticks and other tricks
- X-seq: zsh-users 3759
- From: Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Backticks and other tricks
- Date: Wed, 28 Mar 2001 20:06:19 +0200
- In-reply-to: <1010328154142.ZM16104@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxxxxxxxxx on Wed, Mar 28, 2001 at 03:41:42PM +0000
- Mail-followup-to: Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200103280900.LAA06786@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <1010328154142.ZM16104@xxxxxxxxxxxxxxxxxxxxxxx>
On Wed, Mar 28, 2001 at 03:41:42PM +0000,
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
[...]
>
> One can always be creative:
>
> ${(kP)1} gives an array of keys, so
> ${${(kP)1}[(i)$i]} gives the index of the key;
> ${(vP)1} gives an array of values, so
> ${${(vP)1}[${${(kP)1}[(i)$i]}]} is the answer.
..to the question "who wins the obfuscated zsh contest"? :-)
SCNR,
Thomas
--
Thomas Köhler Email: jean-luc@xxxxxxxxxxxxxxxxx | LCARS - Linux
<>< WWW: http://jeanluc-picard.de | for Computers
IRC: jeanluc | on All Real
PGP public key available from Homepage! | Starships
Attachment:
pgpn3tOJrEpLR.pgp
Description: PGP signature
Messages sorted by:
Reverse Date,
Date,
Thread,
Author