1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-03 04:21:28 -08:00
emacs/lisp/eshell
Jim Porter e63ef66c57 Add support for the "splice operator" in Eshell
This allows splicing lists in-place in argument lists, which is
particularly important when defining aliases using the '$*' special
variable (bug#59960).

* lisp/eshell/esh-var.el (eshell-parse-variable): Add support for the
splice operator.
(eshell-interpolate-variable): Let 'eshell-parse-variable' handle
adding 'eshell-escape-arg'.
(eshell-complete-variable-reference): Handle the splice operator.

* lisp/eshell/esh-arg.el (eshell-concat-groups)
(eshell-prepare-splice): New functions...
(eshell-resolve-current-argument): ... use them.
(eshell-splice-args): New function.

* lisp/eshell/esh-cmd.el (eshell-rewrite-named-command): Handle
'eshell-splice-args'.

* lisp/eshell/esh-util.el (eshell-list-to-string): New function...
(eshell-flatten-and-stringify): ... use it.

* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Remove
'eshell-splice-args' sigils in Eshell command forms so that we can
perform completion on splice-expansions.

* lisp/eshell/em-unix.el (eshell-complete-host-reference): Don't try
to complete arguments containing "$@".

* test/lisp/eshell/esh-var-tets.el (esh-var-test/interp-list-var)
(esh-var-test/interp-list-var-concat, esh-var-test/interp-var-splice)
(esh-var-test/interp-var-splice-concat)
(esh-var-test/quoted-interp-list-var)
(esh-var-test/quoted-interp-list-var-concat)
(esh-var-test/quoted-interp-var-splice)
(esh-var-test/quoted-interp-var-splice-concat): New tests.

* test/lisp/eshell/em-alias-tests.el
(em-alias-test/alias-all-args-var-splice): New test.

* doc/misc/eshell.texi (Dollars Expansion): Explain the splice
operator.
(Aliases): Expand documentation and use '$@*'.
(Built-ins, Bugs and Ideas): Use '$@*' where appropriate.

* etc/NEWS: Announce this change.
2022-12-15 21:41:03 -08:00
..
em-alias.el Make eshell-read-aliases-list an interactive command 2022-12-08 22:55:28 -07:00
em-banner.el
em-basic.el
em-cmpl.el Add support for the "splice operator" in Eshell 2022-12-15 21:41:03 -08:00
em-dirs.el
em-elecslash.el
em-extpipe.el Rename recently added macro to follow conventions 2022-08-04 12:18:46 +02:00
em-glob.el Merge from origin/emacs-28 2022-09-21 10:25:06 +02:00
em-hist.el Autoload string-blank-p 2022-08-09 21:58:00 +02:00
em-ls.el
em-pred.el
em-prompt.el em-prompt: Add repeat-map for eshell-{next,previous}-prompt 2022-11-17 11:35:34 +02:00
em-rebind.el
em-script.el Remove redundant let-bindings of inhibit-point-motion-hooks 2022-10-07 12:16:47 -04:00
em-smart.el Remove redundant let-bindings of inhibit-point-motion-hooks 2022-10-07 12:16:47 -04:00
em-term.el Allow checking specific Eshell handles for interactive output 2022-09-04 15:15:01 -07:00
em-tramp.el lisp/eshell/em-tramp.el: Rename 'TRAMP' to 'Tramp'. 2022-11-05 12:05:05 -07:00
em-unix.el Add support for the "splice operator" in Eshell 2022-12-15 21:41:03 -08:00
em-xtra.el
esh-arg.el Add support for the "splice operator" in Eshell 2022-12-15 21:41:03 -08:00
esh-cmd.el Add support for the "splice operator" in Eshell 2022-12-15 21:41:03 -08:00
esh-ext.el Improve handling of $PATH in Eshell for remote directories 2022-10-17 18:48:52 -07:00
esh-io.el Add support for more kinds of redirect operators in Eshell 2022-09-04 15:15:01 -07:00
esh-mode.el esh-mode: Add repeat-map for eshell-{forward,backward}-argument 2022-11-17 11:36:07 +02:00
esh-module.el
esh-opt.el * lisp/eshell/esh-opt.el (eshell--do-opts): Demote usage-msg to user-error 2022-12-11 10:56:49 -05:00
esh-proc.el ; Fix typos 2022-11-20 12:59:39 +01:00
esh-util.el Add support for the "splice operator" in Eshell 2022-12-15 21:41:03 -08:00
esh-var.el Add support for the "splice operator" in Eshell 2022-12-15 21:41:03 -08:00
eshell.el Delete many items obsolete since 24.3 2022-09-09 11:27:30 +02:00