On 2/3/2022 11:03 AM, Lars Ingebrigtsen wrote: > Jim Porter writes: > >> Here's a small additional improvement that I hope is correct. The >> third patch here changes how eshell-tests-helpers.el is loaded to that >> it uses `require'. This reduces some of the boilerplate and will >> hopefully prevent issues with this file not getting recompiled when >> it's updated. >> >> The first two patches are the same as before. I've just included them >> for completeness/ease of applying. > > Thanks; seems to work well for me, so I've now pushed them to Emacs 29. I found a bug in the second patch. emacs -Q --eval '(eshell)' ~ $ echo hi | *cat This prints: ~ $ hi That is, the output of the command is printed *after* the next prompt. That's because my patch wasn't smart enough about finding the "head" process in a pipeline. In "echo hi | *cat", the head process is "cat" (Eshell's builtin echo command doesn't create a process). In my old patch, it thought the head process was nil, which confused Eshell. Here's a patch with a test to verify that things work correctly. Now the output is: hi~ $ (That's a bit ugly, but Eshell's builtin echo doesn't normally print a newline, so it's correct.)