aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/xargs.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-07-18 13:41:46 -0700
committerRob Landley <rob@landley.net>2019-07-19 01:13:55 -0500
commitc8eee4268f26c271213e6ba0a047d4101ad4b394 (patch)
tree17392dde3ad1d6adece5d33b510784e0c8ca64e7 /toys/posix/xargs.c
parentc86c275068d89c5e106a3b474eff750d2367017c (diff)
downloadtoybox-c8eee4268f26c271213e6ba0a047d4101ad4b394.tar.gz
xargs: don't pretend to support -I.
This was embarrassing... A build script that was using xargs -I silently started to ignore -I when we switched over to toybox xargs. The owner of the script has rewritten it to use the shell read builtin instead, but it's pretty unhelpful to silently ignore an option that radically changes how xargs behaves. (The -I behavior sounds sufficiently different from normal behavior that I'm not sure I've understood, and am just sending this cleanup rather than actually implementing -I correctly.) Bug: http://b/137832162
Diffstat (limited to 'toys/posix/xargs.c')
-rw-r--r--toys/posix/xargs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/toys/posix/xargs.c b/toys/posix/xargs.c
index 6f8c76fb..12af9125 100644
--- a/toys/posix/xargs.c
+++ b/toys/posix/xargs.c
@@ -5,10 +5,11 @@
* See http://opengroup.org/onlinepubs/9699919799/utilities/xargs.html
*
* TODO: Rich's whitespace objection, env size isn't fixed anymore.
- * TODO: -x Exit if can't fit everything in one command
+ * TODO: -I Insert mode
* TODO: -L Max number of lines of input per command
+ * TODO: -x Exit if can't fit everything in one command
-USE_XARGS(NEWTOY(xargs, "^I:E:ptrn#<1s#0[!0E]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_XARGS(NEWTOY(xargs, "^E:ptrn#<1s#0[!0E]", TOYFLAG_USR|TOYFLAG_BIN))
config XARGS
bool "xargs"
@@ -42,7 +43,7 @@ config XARGS_PEDANTIC
GLOBALS(
long s, n;
- char *E, *I;
+ char *E;
long entries, bytes;
char delim;