Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 4.1: multi-parameter for loop
- X-seq: zsh-workers 15004
- From: Andrej Borsenkow <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: PATCH: 4.1: multi-parameter for loop
- Date: Wed, 20 Jun 2001 22:01:28 +0400 (MSD)
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- In-reply-to: <Tc0a88d015442f20480@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
On Wed, 20 Jun 2001, Peter Stephenson wrote:
>
> This extends the for syntax to take multiple parameters after it; they take
> multiple words from the argument list. The main intended use of this is
> for imitating perl's `each' feature:
>
> typeset -A assoc
> assoc=(key1 val1 key2 val2)
> for key value in ${(kv)assoc}; do
> print $key $value
> done
>
This for sure is incompatible with POSIX and all known shells. It does
not make legal scripts fail, but it makes illegal scripts legal. Should we
care about it?
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author