diff options
author | Jim Porter <jporterbugs@gmail.com> | 2022-07-09 16:26:55 -0700 |
---|---|---|
committer | Jim Porter <jporterbugs@gmail.com> | 2022-09-04 15:15:01 -0700 |
commit | ab7e94fb1d9b794c9d199435d72f569fba6ab017 (patch) | |
tree | bdb8f5d264c9377c519ccc61009a4d9ab9551be0 /etc | |
parent | 3d6c013a27e0b72c8fbe2d47f752dd0dfd4ff47a (diff) | |
download | emacs-ab7e94fb1d9b794c9d199435d72f569fba6ab017.tar.gz |
Add support for more kinds of redirect operators in Eshell
* lisp/eshell/esh-arg.el: Require cl-lib.
(eshell-finish-arg): Allow passing multiple ARGUMENTS.
(eshell-quote-argument): Handle the case when 'eshell-finish-arg' was
passed multiple arguments.
* lisp/eshell/esh-cmd.el (eshell-do-pipelines)
(eshell-do-pipelines-synchronously): Only set stdout output handle.
* lisp/eshell/esh-io.el (eshell-redirection-operators-alist): New
constant.
(eshell-io-initialize): Prefer sharp quotes for functions.
(eshell-parse-redirection, eshell-strip-redirections): Add support for
more redirection forms.
(eshell-copy-output-handle, eshell-set-all-output-handles): New
functions.
* test/lisp/eshell/esh-io-tests.el
(esh-io-test/redirect-all/overwrite, esh-io-test/redirect-all/append)
(esh-io-test/redirect-all/insert, esh-io-test/redirect-copy)
(esh-io-test/redirect-copy-first, esh-io-test/redirect-pipe): New
tests.
* doc/misc/eshell.texi (Redirection): Document new redirection syntax.
(Pipelines): Document '|&' syntax.
(Bugs and ideas): Update item about redirection syntax.
* etc/NEWS: Announce this change.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/NEWS | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -321,6 +321,10 @@ been restricted to "...", '...', /.../, |...|, (...), [...], <...>, and {...}. See the "(eshell) Argument Predication and Modification" node in the Eshell manual for more details. ++++ +*** Eshell pipelines now only pipe stdout by default. +To pipe both stdout and stderr, use the '|&' operator instead of '|'. + --- ** The 'delete-forward-char' command now deletes by grapheme clusters. This command is by default bound to the <Delete> function key @@ -2238,6 +2242,13 @@ commands are Lisp function or external when supplying absolute file name arguments. See "Electric forward slash" in the Eshell manual. +++ +*** Improved support for redirection operators in Eshell. +Eshell now supports a wider variety of redirection operators. For +example, you can now redirect both stdout and stderr via '&>' or +duplicate one output handle to another via 'NEW-FD>&OLD-FD'. For more +information, see "Redirections" in the Eshell manual. + ++++ *** Double-quoting an Eshell expansion now treats the result as a single string. If an Eshell expansion like '$FOO' is surrounded by double quotes, the result will always be a single string, no matter the type that would |