[Toybox] [PATCH] xargs: add --max-args synonym, -o option, and fix -p.

enh enh at google.com
Sat Aug 17 20:22:06 PDT 2019


The Linux kernel uses the --max-args synonym for -n.

Barbarians who use vi need xargs' -o to be able to do something like:

  find -name xargs.c | xargs vi      # Sad vi.
  find -name xargs.c | xargs -o vi   # Happy vi.

The -p option needs fixing to read from /dev/tty because stdin is
otherwise occupied in xargs. I think xargs is the only place that needs
this, so it didn't seem sensible to make all callers to yesno() be
specific about which they wanted, hence the new function.

Also remove the documentation for the build-time XARGS_PEDANTIC option
which isn't actually implemented.

Also add a TODO for -P (which is used by at least one script in the
Linux kernel).
---
 lib/lib.c          |  7 ++++++-
 lib/lib.h          |  1 +
 toys/posix/xargs.c | 20 +++++++++-----------
 3 files changed, 16 insertions(+), 12 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-xargs-add-max-args-synonym-o-option-and-fix-p.patch
Type: text/x-patch
Size: 4088 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190817/e1462d61/attachment-0002.bin>


More information about the Toybox mailing list