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

Re: Problem with glob qualifier e



On Monday 05 September 2005 20:32, Hannu Koivisto wrote:
[...]
> echo (sur|pur)(e:'<something>':)
>
> which, when expanded, should result to
>
> echo pur -foo bar sur -foo bar
>
> I expected
>
> echo (sur|pur)(e:'reply=(${REPLY} -foo bar)':)
>
> to do what I want but instead that results to
>
> echo -foo -foo bar bar pur sur
>
> I can't see how that follows from the quoted documentation.  

List is sorted after all matches are added; meaning that anything you have 
added is reordred. Hmm ... adding qualifier that prevents sorting is 
relatively simple actually ...

> In any 
> case, if my goal cannot be achieved with the glob qualifier e, is
> there some other brief trick to modify the list of generated
> filenames in such a way?

print -l sur pur | xargs -i /bin/echo '{}' -foo bar

(I do not know why xargs here won't process arguments seperated by spaces, it 
should)

-andrey

Attachment: pgpGdSxawZvhg.pgp
Description: PGP signature



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