mirror of
git://git.sv.gnu.org/findutils.git
synced 2026-01-29 20:58:59 +01:00
'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