Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Backticks and other tricks



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