Files
findutils/xargs
Bernhard Voelker 6e55ad98b1 xargs: avoid trailing blank in -t,--verbose output
'xargs -t' had a trailing blank in the output, e.g.:
  $ echo a b | xargs -t 2>&1 | cat -e
  echo a b $
  a b$
POSIX mandates that the constructed command line "shall be written
to standard error, as it will be invoked", so avoid outputting the
trailing blank.
FWIW: This change still plays well with -p,--interactive, because
POSIX says to just output "?..." as a prompt after the -t output.

* xargs/xargs.c (print_args): Instead of outputting a blank after each
cmd_argv[i], output a blank before each item unless for the first one.
* tests/xargs/verbose-quote.sh: Remove trailing blanks from expected
stderr.
* xargs/testsuite/xargs.gnu/space-t-0.xe: Likewise.
* xargs/testsuite/xargs.sysv/empty-t.xe: Likewise.
* xargs/testsuite/xargs.sysv/empty_def-t.xe: Likewise.
* xargs/testsuite/xargs.sysv/s25-t.xe: Likewise.
* xargs/testsuite/xargs.sysv/space-t.xe: Likewise.
* xargs/testsuite/xargs.sysv/trace.xe: Likewise.
* NEWS: Mention the change.

Reported by 積丹尼 Dan Jacobson <jidanni@jidanni.org> in:
    https://bugs.gnu.org/?57291
2019-11-25 22:39:33 +01:00
..
2016-02-16 23:27:44 +01:00