1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 02:51:31 -08:00
emacs/test/lisp/eshell
Jim Porter 7c41016fca Allow setting the values of variable aliases in Eshell
This makes commands like "COLUMNS=40 some-command" work as expected.

* lisp/eshell/esh-cmd.el (eshell-subcommand-bindings): Remove
'process-environment' from here...

* lisp/eshell/esh-var.el (eshell-var-initialize): ... and add to here,
along with 'eshell-variable-aliases-list'.
(eshell-inside-emacs): Convert to a 'defvar-local' to make it settable
in a particular Eshell buffer.
(eshell-variable-aliases-list): Make $?, $$, and $* read-only and
update docstring.
(eshell-set-variable): New function...
(eshell-handle-local-variables, eshell/export, eshell/unset): ... use
it.
(eshell/set, pcomplete/eshell-mode/set): New functions.
(eshell-get-variable): Get the variable alias's getter function when
appropriate and use a safer method for checking function arity.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/set/env-var)
(esh-var-test/set/symbol, esh-var-test/unset/env-var)
(esh-var-test/unset/symbol, esh-var-test/setq, esh-var-test/export)
(esh-var-test/local-variables, esh-var-test/alias/function)
(esh-var-test/alias/function-pair, esh-var-test/alias/string)
(esh-var-test/alias/string/prefer-lisp, esh-var-test/alias/symbol)
(esh-var-test/alias/symbol-pair, esh-var-test/alias/export)
(esh-var-test/alias/local-variables): New tests.

* doc/misc/eshell.texi (Built-ins): Add 'set' and update 'unset'
documentation.
(Variables): Expand documentation of how to get/set variables.
2022-10-17 18:48:52 -07:00
..
em-alias-tests.el Provide ERT explainer for 'eshell-match-command-output' 2022-08-15 20:40:27 -07:00
em-basic-tests.el Add 'eshell-command-result-equal' with an ERT explainer 2022-08-15 20:40:27 -07:00
em-dirs-tests.el Add 'eshell-command-result-equal' with an ERT explainer 2022-08-15 20:40:27 -07:00
em-extpipe-tests.el Provide ERT explainer for 'eshell-match-command-output' 2022-08-15 20:40:27 -07:00
em-glob-tests.el Make Eshell globs ending in "/" match directories only 2022-06-26 16:52:38 +02:00
em-hist-tests.el
em-ls-tests.el
em-pred-tests.el ; Improve time-convert call in recently changed test 2022-08-07 13:16:53 +02:00
em-script-tests.el Provide ERT explainer for 'eshell-match-command-output' 2022-08-15 20:40:27 -07:00
em-tramp-tests.el Adapt em-tramp-tests.el 2022-02-06 18:50:16 +01:00
esh-cmd-tests.el Simplify Eshell handle functions and add tests/documentation 2022-09-04 15:15:01 -07:00
esh-io-tests.el Add support for more kinds of redirect operators in Eshell 2022-09-04 15:15:01 -07:00
esh-opt-tests.el
esh-proc-tests.el ; Fix a race condition in an Eshell test 2022-09-08 15:13:17 -07:00
esh-var-tests.el Allow setting the values of variable aliases in Eshell 2022-10-17 18:48:52 -07:00
eshell-tests-helpers.el ; Allow ignoring errors when calling 'eshell-match-command-output' 2022-10-17 18:48:52 -07:00
eshell-tests.el Simplify Eshell handle functions and add tests/documentation 2022-09-04 15:15:01 -07:00