Function: tramp-eshell-directory-change
tramp-eshell-directory-change is a byte-compiled function defined in
tramp-integration.el.gz.
Signature
(tramp-eshell-directory-change)
Documentation
Set eshell-path-env to $PATH of the host related to default-directory.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-integration.el.gz
;;; Integration of eshell.el:
;; eshell.el keeps the path in `eshell-path-env'. We must change it
;; when `default-directory' points to another host.
(defun tramp-eshell-directory-change ()
"Set `eshell-path-env' to $PATH of the host related to `default-directory'."
;; Remove last element of `(exec-path)', which is `exec-directory'.
;; Use `path-separator' as it does eshell.
(setq eshell-path-env
(mapconcat
#'identity (butlast (tramp-compat-exec-path)) path-separator)))