From 94a5b957ae84d14eff17204a0df751ec5a973923 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Thu, 15 Sep 2022 12:32:02 -0700 Subject: [PATCH 5/5] 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 9a56b56458..0151bec0a2 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -1275,8 +1275,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