diff options
author | Jim Porter <jporterbugs@gmail.com> | 2022-02-04 22:41:39 -0800 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-02-05 07:58:59 +0100 |
commit | 785a045b868e0aeef08858e86a9efe48311e8f48 (patch) | |
tree | 2b87eab3110904dad4c8f6d139d1d5084bdfabd7 /lisp/eshell | |
parent | a8de2e20e093bb45231327e824ceb8421993634e (diff) | |
download | emacs-785a045b868e0aeef08858e86a9efe48311e8f48.tar.gz emacs-785a045b868e0aeef08858e86a9efe48311e8f48.tar.bz2 emacs-785a045b868e0aeef08858e86a9efe48311e8f48.zip |
Ensure that the CAR of 'eshell-last-async-procs' always points to a process
Previously, if a non-process was piped to a process, this could end up
being nil, which isn't correct. 'eshell-last-async-procs' should just
ignore non-process commands in a pipeline.
* lisp/eshell/esh-cmd.el (eshell-do-pipelines): Set 'headproc'
correctly.
* test/lisp/eshell/eshell-tests.el (eshell-test/pipe-headproc): New test.
Diffstat (limited to 'lisp/eshell')
-rw-r--r-- | lisp/eshell/esh-cmd.el | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index e702de03a03..5819506cc0e 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -800,8 +800,7 @@ This macro calls itself recursively, with NOTFIRST non-nil." ((cdr pipeline) t) (t (quote 'last))))) (let ((proc ,(car pipeline))) - ,(unless notfirst - '(setq headproc proc)) + (setq headproc (or proc headproc)) (setq tailproc (or tailproc proc)) proc)))))) |