]> git.eshelyaron.com Git - emacs.git/commit
Improve handling of $PATH in Eshell for remote directories
authorJim Porter <jporterbugs@gmail.com>
Thu, 15 Sep 2022 19:24:37 +0000 (12:24 -0700)
committerJim Porter <jporterbugs@gmail.com>
Tue, 18 Oct 2022 01:48:52 +0000 (18:48 -0700)
commitcee1cbfd54375cdece23d4741ced6b0c7091f6d9
tree482d4bf98473742958b4ce4f1fba1c3e305aa093
parent7c41016fca5ab0638f1e2fed260e2ee41f3400c2
Improve handling of $PATH in Eshell for remote directories

* lisp/eshell/esh-util.el (eshell-path-env, eshell-parse-colon-path):
Make obsolete.
(eshell-path-env-list): New variable.
(eshell-connection-default-profile): New connection-local profile.
(eshell-get-path): Reimplement using 'eshell-path-env-list'; add
LITERAL-P argument.
(eshell-set-path): New function.

* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Add entry for
$PATH.
(eshell-var-initialize): Add 'eshell-path-env-list' to
'eshell-subcommand-bindings'.

* lisp/eshell/esh-ext.el (eshell-search-path): Use 'file-name-concat'
instead of 'concat'.
(eshell/addpath): Use 'eshell-get-path' and 'eshell-set-path'.

* lisp/net/tramp-integration.el: Only apply Eshell hooks when
'eshell-path-env-list' is unbound.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/path-var/local-directory)
(esh-var-test/path-var/remote-directory, esh-var-test/path-var/set)
(esh-var-test/path-var/set-locally)
(esh-var-test/path-var-preserve-across-hosts): New tests.

* test/lisp/eshell/esh-ext-tests.el: New file.

* test/lisp/eshell/eshell-tests-helpers.el
(with-temp-eshell): Set 'eshell-last-dir-ring-file-name' to nil.
(eshell-tests-remote-accessible-p, eshell-last-input)
(eshell-last-output): New functions.
(eshell-match-output, eshell-match-output--explainer): Use
'eshell-last-input' and 'eshell-last-output'.

* doc/misc/eshell.texi (Variables): Document $PATH.

* etc/NEWS: Announce this change (bug#57556).
doc/misc/eshell.texi
etc/NEWS
lisp/eshell/esh-ext.el
lisp/eshell/esh-util.el
lisp/eshell/esh-var.el
lisp/net/tramp-integration.el
test/lisp/eshell/esh-ext-tests.el [new file with mode: 0644]
test/lisp/eshell/esh-var-tests.el
test/lisp/eshell/eshell-tests-helpers.el