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

Re: zargs: unexpected, non-xargs behaviour



*sigh* The reply should have gone to the list. Sorry, my bad.

Hey,

On Mon, May 7, 2012 at 5:25 PM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> } Well, then zargs is not POSIX compliant
> } ...and also not equivalent to GNU xargs.
>
> Well, if you'll pardon the expression, duh.  The whole premise of zargs
> is off the xargs rails because it doesn't read files or count lines.

I'm referring zsh's documentation:

[citation]
    This function works like GNU xargs, except that instead of reading
    lines of arguments from the standard input, it takes them from the
    command line.
[/citation]

For me as a user of zsh unfamiliar with its internals this has the
heavy implication that it works just like GNU xargs with a single
important difference. In reality it has a lot of similarities but
important differences in how arguments are counted and what happens if
limits are exceeded.

The documentation even closes with

[citation]
    For details of the other zargs options, see man page xargs(1) or
    run zargs with the --help option.
[/citation]

indicating once more that the options are supposed to work
identically. Which they simply don't. And that's what I find very
confusing.

A strong hint at the very beginning of the documentation that the
number of arguments are counted differently in GNU xargs and zargs
would probably help a lot. At least you could refer to the fact being
documented properly instead of having to argue with users like me ;)

Kind regards,
mo



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