* lisp/eshell/em-dirs.el (eshell-dirs-initialize): Properly handle
indexing for variable aliases.
* lisp/eshell/esh-var (eshell-variable-aliases-list): Properly handle
indexing for variable aliases, and add SIMPLE-FUNCTION entry for
aliases.
(eshell-get-variable): Update how variable alias functions are called.
* test/lisp/eshell/em-alias-tests.el
(em-alias-test/alias-arg-vars-indices)
(em-alias-test/alias-arg-vars-split-indices)
(em-alias-test/alias-all-args-var-split-indices):
* test/lisp/eshell/em-dirs-tests.el (em-dirs-test/pwd-var-indices)
(em-dirs-test/oldpwd-var-indices)
(em-dirs-test/directory-ring-var-indices):
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/inside-emacs-var-split-indices)
(esh-var-test/last-result-var-split-indices): New tests.
(esh-var-test/last-arg-var-split-indices): Expand test to check
conversion behavior inside double quotes (bug#56509).