From 95f021dede1be4b53cd789704543bbfa945442ee Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Thu, 15 Sep 2022 12:32:02 -0700 Subject: [PATCH 7/7] Print the correct $PATH when Eshell's 'which' fails to find a command * lisp/eshell/esh-cmd.el (eshell/which): Use 'eshell-get-path' (bug#20008). --- lisp/eshell/esh-cmd.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index c5ceb3ffd1..4a41bbe8fa 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -1274,8 +1274,9 @@ eshell/which name) (eshell-search-path name))))) (if (not program) - (eshell-error (format "which: no %s in (%s)\n" - name (getenv "PATH"))) + (eshell-error (format "which: no %s in (%s)\n" + name (string-join (eshell-get-path t) + (path-separator)))) (eshell-printn program))))) (put 'eshell/which 'eshell-no-numeric-conversions t) -- 2.25.1