|
From: | Jim Porter |
Subject: | bug#53715: 29.0.50; [PATCH] Improve correctness of pipelines in Eshell |
Date: | Fri, 4 Feb 2022 22:51:43 -0800 |
On 2/3/2022 11:03 AM, Lars Ingebrigtsen wrote:
Jim Porter <jporterbugs@gmail.com> 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: ~ $ hiThat 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.)
0001-Ensure-that-the-CAR-of-eshell-last-async-procs-alway.patch
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |