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

Re: e:: with an array ?



le 22/08/2006,
Bart Schaefer nous écrivait :
> On Aug 22, 10:45pm, Marc Chantreux wrote:
> In general there's no correlation between glob qualifiers and parameter
> expansion flags, so you shouldn't expect that.  E.g. ${(U)x} means to
> convert $x to uppercase, but *(U) means to match files owned by the
> current effective user ID.

In general .. but this correlation can be very usefull so i've tried
something that smells logical for me :-)

> } I haven't found an alternative in the doc so i wonder again
> } (http://www.zsh.org/mla/users//2006/msg00193.html) if there is a kinda
> } perl grep :-)
> 
> If you mean
>   grep { func } @x

this grep, yes. 

> as in
>   map { if (func) { $_ } else { () } } @x
> then no, there is no direct zsh equivalent, except in the special case
> where func is the zsh equivalent of m/pattern/.

something like python yield, so ? 

no ... i'm kidding!

Thanks for enligthenment, Bart.

regards
mc

-- 
téléphone : 03.90.24.00.19
courriel  : marc.chantreux@xxxxxxxxxxxxxxxxxx
---------------------------------------



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