]> git.eshelyaron.com Git - emacs.git/commit
Add 'eshell-duplicate-handles' to return a copy of file handles
authorJim Porter <jporterbugs@gmail.com>
Tue, 20 Dec 2022 06:21:10 +0000 (22:21 -0800)
committerJim Porter <jporterbugs@gmail.com>
Thu, 22 Dec 2022 19:35:12 +0000 (11:35 -0800)
commit54087e84df872c9aa30866b880e8ac0b917cbd94
treeff128514af3020cae7dcbe98260a153ad78fb0e8
parentd3f1682ae9f95ee912d9bc5a2ab5c58659abf065
Add 'eshell-duplicate-handles' to return a copy of file handles

* lisp/eshell/esh-io.el (eshell-create-handles): Support creating with
multiple targets for stdout and/or stderr.  Make the targets for a
handle always be a list, and store whether the targets are the default
in a separate 'default' field.
(eshell-protect-handles, eshell-close-handles)
(eshell-copy-output-handle, eshell-interactive-output-p)
(eshell-output-object): Update for changes in 'eshell-create-handles'.
(eshell-duplicate-handles, eshell-get-targets): New functions.

* lisp/eshell/esh-cmd.el (eshell-copy-handles): Rename and alias to...
(eshell-with-copied-handles): ... this function, and use
'eshell-duplicate-handles'.
(eshell-execute-pipeline): Use 'eshell-duplicate-handles'.
lisp/eshell/esh-cmd.el
lisp/eshell/esh-io.el