On 8/29/2023 11:59 AM, Stefan Kangas wrote: > Jim Porter writes: > >> This looks like a race condition when executing this command: >> >> echo ${*echo "foo\nbar"}-baz >> >> That *should* print "foo\nbar-baz", but it tries to print "-baz" (and >> fails). That appears to be because the subcommand (*echo "foo\nbar") >> produces no output. > > I can confirm that the error is intermittent, as I'm not seeing it on a re-run. Can you try the following patches? They shouldn't change the behavior, but they do add some extra debugging information to failed tests. If you can get this to occur when using Eshell interactively, you can also enable this output by calling "eshell-debug process" at an Eshell prompt before running the offending command.