Re: xargs prompts with the same string, but executes differently

2019-08-07 Thread James Youngman
They say that to help people choose (for example) -I for greater portability to other systems. Using xargs -i in a script would perhaps make that script not work on other systems. So we try to help people choose the more portable options. If you disagree with the wording, please send a patch p

Re: xargs prompts with the same string, but executes differently

2019-07-30 Thread Bernhard Voelker
On 7/29/19 8:52 AM, Bernhard Voelker wrote: > Thanks, attached as patch with a test case, NEWS entry, etc. Pushed at: https://git.sv.gnu.org/cgit/findutils.git/commit/?id=eeefd1dc7 Have a nice day, Berny

Re: xargs prompts with the same string, but executes differently

2019-07-29 Thread 積丹尼 Dan Jacobson
Well the man page and INFO page say depreciated. So better clean them up.

Re: xargs prompts with the same string, but executes differently

2019-07-29 Thread Eric Blake
On 7/29/19 1:49 PM, 積丹尼 Dan Jacobson wrote: > P.S., > $ xargs --help > -I R same as --replace=R > -i, --replace[=R]replace R in INITIAL-ARGS with names read > from standard input; if R is unspecified, >

Re: xargs prompts with the same string, but executes differently

2019-07-29 Thread 積丹尼 Dan Jacobson
P.S., $ xargs --help -I R same as --replace=R -i, --replace[=R]replace R in INITIAL-ARGS with names read from standard input; if R is unspecified, assume {} ... Don't you want to mention one i

Re: xargs prompts with the same string, but executes differently

2019-07-29 Thread 積丹尼 Dan Jacobson
Well all I know is the whole idea of xargs is to *separate* the things coming in into separate arguments. So when the user uses -I, he expects it to just act the same, with the extra feature being that he can now also put things into the beginning or middle of lines, not just the ends. Never in h

Re: xargs prompts with the same string, but executes differently

2019-07-28 Thread Bernhard Voelker
On 7/25/19 6:28 PM, 積丹尼 Dan Jacobson wrote: > "Warning: whatever you feed in will become one argument glued together." IMO that doesn't sound too far away from what is currently in the manpage: "[...] Also, unquoted blanks do not terminate input items; instead the separator is the newlin

Re: xargs prompts with the same string, but executes differently

2019-07-28 Thread Bernhard Voelker
On 7/24/19 11:28 PM, Eric Blake wrote: > Looks reasonable to me (other than line wrapping). Thanks, attached as patch with a test case, NEWS entry, etc. Comments? Have a nice day, Berny From eeefd1dc72102c5d8c70912be943a71a0fb153aa Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Sun, 28 Ju

Re: xargs prompts with the same string, but executes differently

2019-07-25 Thread 積丹尼 Dan Jacobson
JY> Please feel that you should phrase your suggestion in the form of a patch. I don't know what to write. "Warning: whatever you feed in will become one argument glued together."

Re: xargs prompts with the same string, but executes differently

2019-07-25 Thread James Youngman
On Thu, Jul 25, 2019 at 3:28 PM 積丹尼 Dan Jacobson wrote: > still needs to add a tip to use -p or -t to see the quoting realities of > how REPLACE-STR is used... Please feel that you should phrase your suggestion in the form of a patch.

Re: xargs prompts with the same string, but executes differently

2019-07-25 Thread 積丹尼 Dan Jacobson
OK, but '-I REPLACE-STR' '--replace[=REPLACE-STR]' '-i[REPLACE-STR]' Replace occurrences of REPLACE-STR in the initial arguments with names read from standard input. Also, unquoted blanks do not terminate arguments; instead, the input is split at newlines on

Re: xargs prompts with the same string, but executes differently

2019-07-24 Thread Eric Blake
On 7/24/19 4:20 PM, Bernhard Voelker wrote: > I agree that another new option is way too much. That question to the user > is meant for interactive use only anyway, so what about simply: > > diff --git a/xargs/xargs.c b/xargs/xargs.c > index 913328b8..85084123 100644 > --- a/xargs/xargs.c > +++

Re: xargs prompts with the same string, but executes differently

2019-07-24 Thread Bernhard Voelker
On 7/24/19 4:30 PM, Eric Blake wrote: > On 7/24/19 6:28 AM, James Youngman wrote: >> On Tue, Jul 23, 2019 at 7:51 PM 積丹尼 Dan Jacobson wrote: >>> >>> OK. >>> But I now "demand" that xargs add a --show-quoting or whatever argument, >> >> Your demand must be presented in the form of a patch. > > Is

Re: xargs prompts with the same string, but executes differently

2019-07-24 Thread Eric Blake
On 7/24/19 6:28 AM, James Youngman wrote: > On Tue, Jul 23, 2019 at 7:51 PM 積丹尼 Dan Jacobson wrote: >> >> OK. >> But I now "demand" that xargs add a --show-quoting or whatever argument, > > Your demand must be presented in the form of a patch. Is a new option necessary, or can we just use gnulib

Re: xargs prompts with the same string, but executes differently

2019-07-24 Thread James Youngman
On Tue, Jul 23, 2019 at 7:51 PM 積丹尼 Dan Jacobson wrote: > > OK. > But I now "demand" that xargs add a --show-quoting or whatever argument, Your demand must be presented in the form of a patch. > so that --verbose, and -p, will now show > 'xdotool' 'mousemove' '0 0' 'click' '1' 'mousemove' 'rest

Re: xargs prompts with the same string, but executes differently

2019-07-23 Thread 積丹尼 Dan Jacobson
Plus I'm not sure that '-I REPLACE-STR' '--replace[=REPLACE-STR]' '-i[REPLACE-STR]' Replace occurrences of REPLACE-STR in the initial arguments with names read from standard input. Also, unquoted blanks do not terminate arguments; instead, the input is

Re: xargs prompts with the same string, but executes differently

2019-07-23 Thread 積丹尼 Dan Jacobson
OK. But I now "demand" that xargs add a --show-quoting or whatever argument, so that --verbose, and -p, will now show 'xdotool' 'mousemove' '0 0' 'click' '1' 'mousemove' 'restore' ?... vs. 'xdotool' 'mousemove' '0' '0' 'click' '1' 'mousemove' 'restore' ?... for people who care about those details,

Re: xargs prompts with the same string, but executes differently

2019-07-23 Thread Eric Blake
On 7/23/19 1:31 PM, Assaf Gordon wrote: > > This is not about "-p", but simply that "{}" puts the entire input line > ("0 0") as a single parameter (as if quoted). > > The correct comparison is: > >   echo | xargs -p xdotool mousemove 0 0 click 1 mousemove restore > vs >   echo | xargs -p xdoto

Re: xargs prompts with the same string, but executes differently

2019-07-23 Thread Assaf Gordon
Hello, On 2019-07-23 9:59 a.m., 積丹尼 Dan Jacobson wrote: Proof that xargs prompts with the same string, but executes differently: $ echo 0 0 | xargs -p -I{} xdotool mousemove {} click 1 mousemove restore xdotool mousemove 0 0 click 1 mousemove restore ?...y xdotool: Unknown command: 1 Run

xargs prompts with the same string, but executes differently

2019-07-23 Thread 積丹尼 Dan Jacobson
Proof that xargs prompts with the same string, but executes differently: $ echo 0 0 | xargs -p -I{} xdotool mousemove {} click 1 mousemove restore xdotool mousemove 0 0 click 1 mousemove restore ?...y xdotool: Unknown command: 1 Run 'xdotool help' if you want a command list $ echo