eshell-variable-aliases-list

eshell-variable-aliases-list is a variable defined in `esh-var.el'.
Its value is shown below.
  • This variable may be risky if used as a file-local variable.

Documentation:
This list provides aliasing for variable references.
It is very similar in concept to what `eshell-user-aliases-list' does
for commands. Each member of this defines the name of a command,
and the Lisp value to return for that variable if it is accessed
via the syntax '$NAME'.

If the value is a function, that function will be called with two
arguments: the list of the indices that was used in the reference, and
whether the user is requesting the length of the ultimate element.
For example, a reference of '$NAME[10][20]' would result in the
function for alias `NAME' being called (assuming it were aliased to a
function), and the arguments passed to this function would be the list
'(10 20)', and nil.

You can customize this variable.

Value:

(("COLUMNS" (lambda (indices) (window-width)) t) ("LINES" (lambda (indices) (window-height)) t) ("_" (lambda (indices) (if (not indices) (car (last eshell-last-arguments)) (eshell-apply-indices eshell-last-arguments indices)))) ("?" eshell-last-command-status) ("$" eshell-last-command-result) ("0" eshell-command-name) ("1" (lambda (indices) (nth 0 eshell-command-arguments))) ("2" (lambda (indices) (nth 1 eshell-command-arguments))) ("3" (lambda (indices) (nth 2 eshell-command-arguments))) ("4" (lambda (indices) (nth 3 eshell-command-arguments))) ("5" (lambda (indices) (nth 4 eshell-command-arguments))) ("6" (lambda (indices) (nth 5 eshell-command-arguments))) ("7" (lambda (indices) (nth 6 eshell-command-arguments))) ("8" (lambda (indices) (nth 7 eshell-command-arguments))) ("9" (lambda (indices) (nth 8 eshell-command-arguments))) ("*" (lambda (indices) (if (not indices) eshell-command-arguments (eshell-apply-indices eshell-command-arguments indices)))))