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

Re: how to?



On 2002-08-25 at 05:27 +0000, Bart Schaefer wrote:
> The trouble, of course, is that it's very difficult to generalize, such
> that you know which arguments have to be kept with argv[0] on every call
> and which can be split across calls.  You end up having to "invert" the
> syntax, i.e., put the splittable args first, then some flag value (such
> as "--"), and finally the command with its fixed args:

If it were, say, a glob modifier, then it could be documented to mean
"anything not a glob with this modifier will be repeated" -- that should
cover the majority of the situations and be a clear enough trade-off.

If it's a pre-command modifier, then it would simply be "anything not a
glob is repeated".

Ie "don't mix specified files and globs which might be repeated".

> 	zargs **/*.c -- ls -l
> 
> That could actually be written as a shell function:

That covers most of it, really.  I'll give that a go first.

Thanks,
-- 
Magizine: A weekly read for wise men

Attachment: pgpA9juH4mtxF.pgp
Description: PGP signature



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