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

Re: zargs doesn't work reliably



On 8/18/06, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
Usage: zargs [options --] [input-args] [-- command [initial-args]]

% touch -- -- -+
% zargs -- * -- ls -d
(eval):2: command not found: -+
% zargs * -- ls -d
ls: invalid option -- +
Try `ls --help' for more information.
% zargs * ls -d
-+ ls -d

since input-args is the only part you do not control, it should come
last, like so
Usage: zargs [options --] [command [initial-args]] -- [input-args]
A problem is how to give -- as initial-args then, maybe someone less
tired can come up with something?

Well, all you'd need to worry about is whether it's the first, second,
or third -- on the line.  Still, isn't doing something like

 % zargs ./* -- ls -d

easier than changing the semantics of zargs option-parsing?

 nikolai



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