1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 09:51:22 -08:00
emacs/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.el Only set Eshell execution result metavariables when non-nil 2022-08-12 22:07:13 -07:00
em-banner.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
em-basic.el Don't use 'eshell-convert' when all we want is a number 2022-03-29 16:50:48 +02:00
em-cmpl.el Fix eshell directory and executable completion on action t 2022-09-19 10:22:55 +02:00
em-dirs.el Ensure Eshell variable aliases properly handle indexing 2022-07-12 15:11:00 +02:00
em-elecslash.el New electric forward slash Eshell module 2022-04-21 11:57:12 -07:00
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 Account for remapped faces in $COLUMNS and $LINES in Eshell 2022-06-09 10:08:15 +03:00
em-pred.el Optionally signal an error if an Eshell predicate fails to match anything 2022-06-26 16:51:21 +02:00
em-prompt.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
em-rebind.el When executing an Eshell pipeline, send input to the first process 2022-02-03 20:02:22 +01:00
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 Make usage of su and sudo consistent in eshell (bug#53783) 2022-02-06 09:43:13 +01:00
em-unix.el Rename file-attribute-file-number' to file-attribute-file-identifier' 2022-10-14 21:32:15 +02:00
em-xtra.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
esh-arg.el Remove redundant let-bindings of inhibit-point-motion-hooks 2022-10-07 12:16:47 -04:00
esh-cmd.el Allow setting the values of variable aliases in Eshell 2022-10-17 18:48:52 -07:00
esh-ext.el Fix eshell-explicit-command-char doc string typo 2022-03-25 19:02:04 +01: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 Remove redundant let-bindings of inhibit-point-motion-hooks 2022-10-07 12:16:47 -04:00
esh-module.el Add Eshell syntax to more easily bypass Eshell's own pipelining 2022-01-24 21:46:31 +01:00
esh-opt.el ; Fix typos 2022-05-15 11:15:06 +02:00
esh-proc.el Fix encoding and decoding of process I/O in Eshell on Windows 2022-10-15 13:59:49 +03:00
esh-util.el ; Unconditionally require built-in libraries 2022-08-08 18:18:50 +02:00
esh-var.el Allow setting the values of variable aliases in Eshell 2022-10-17 18:48:52 -07:00
eshell.el Delete many items obsolete since 24.3 2022-09-09 11:27:30 +02:00