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

Re: PATCH: 4.1: multi-parameter for loop



On Jun 20,  7:39pm, Peter Stephenson wrote:
} Subject: Re: PATCH: 4.1: multi-parameter for loop
}
} I much more concerned that there's some valid POSIXy case I've missed
} that this screws up.

Well, there's this:

	for in in in in; do echo $in; done

I haven't applied your patch yet, so I don't know whether it fouls up
the above, but clearly a parameter named "in" can only appear in the first
position, and everything else has to be taken as a keyword first and only
a parameter name otherwise.

} I'm perfectly happy to attach it to some
} relevant option, but I don't think there is a good one;

What if you attached it to the "foreach" keyword, but not "for"?  So then
one would have to write

	foreach x y z (p d q) ...

Just a thought.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author