1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 03:40:56 -08:00
emacs/test/lisp/eshell
Jim Porter f7a82699d6 Eshell variable expansion should always return strings inside quotes
This is closer in behavior to regular shells, and gives Eshell users
greater flexibility in how variables are expanded.

* lisp/eshell/esh-util.el (eshell-convert): Add TO-STRING argument.

* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Add MODIFIER-P
argument and adjust how 'eshell-convert' and 'eshell-apply-indices'
are called.
(eshell-get-variable, eshell-apply-indices): Add QUOTED argument.

* test/lisp/eshell/esh-var-tests.el (eshell-test-value): New defvar.
(esh-var-test/interp-convert-var-number)
(esh-var-test/interp-convert-var-split-indices)
(esh-var-test/interp-convert-quoted-var-number)
(esh-var-test/interp-convert-quoted-var-split-indices)
(esh-var-test/interp-convert-cmd-string-newline)
(esh-var-test/interp-convert-cmd-multiline)
(esh-var-test/interp-convert-cmd-number)
(esh-var-test/interp-convert-cmd-split-indices)
(esh-var-test/quoted-interp-convert-var-number)
(esh-var-test/quoted-interp-convert-var-split-indices)
(esh-var-test/quoted-interp-convert-quoted-var-number)
(esh-var-test/quoted-interp-convert-quoted-var-split-indices)
(esh-var-test/quoted-interp-convert-cmd-string-newline)
(esh-var-test/quoted-interp-convert-cmd-multiline)
(esh-var-test/quoted-interp-convert-cmd-number)
(esh-var-test/quoted-interp-convert-cmd-split-indices): New tests.

* doc/misc/eshell.texi (Arguments): Expand this section, and document
the new behavior.
(Dollars Expansion): Provide more detail about '$(lisp)' and
'${command}' forms.

* etc/NEWS (Eshell): Announce this change (bug#55236).
2022-05-03 18:22:57 +02:00
..
em-basic-tests.el Add tests for Eshell's umask command 2022-03-29 16:50:45 +02:00
em-extpipe-tests.el Inhibit extpipe tests on EMBA, because they apparently time out? 2022-03-07 04:09:27 +01:00
em-glob-tests.el Add unit tests and documentation for Eshell pattern-based globs 2022-04-17 10:27:39 +03:00
em-hist-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
em-ls-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
em-pred-tests.el Handle escaped characters in Eshell argument predicates/modifiers 2022-05-01 20:41:21 +02:00
em-tramp-tests.el Adapt em-tramp-tests.el 2022-02-06 18:50:16 +01:00
esh-opt-tests.el Treat "-" as a positional arg in 'eshell-eval-using-options' 2022-01-25 13:28:48 +01:00
esh-proc-tests.el Fix esh-proc-tests on macOS 2022-03-13 11:01:59 +01:00
esh-var-tests.el Eshell variable expansion should always return strings inside quotes 2022-05-03 18:22:57 +02:00
eshell-tests-helpers.el Handle escaped characters in Eshell special references (e.g. buffers) 2022-05-01 20:41:23 +02:00
eshell-tests.el Handle escaped characters in Eshell special references (e.g. buffers) 2022-05-01 20:41:23 +02:00