From 8e57add6c71568af151c8f965e968677f2a70c56 Mon Sep 17 00:00:00 2001 From: Juergen Hoetzel Date: Sun, 15 May 2022 09:00:35 +0200 Subject: [PATCH] Use tramp-aware shell function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes wrong report of disk usage when using ‘eshell-info-banner-tramp-aware’. --- eshell-info-banner.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eshell-info-banner.el b/eshell-info-banner.el index eb73060..be3991a 100644 --- a/eshell-info-banner.el +++ b/eshell-info-banner.el @@ -216,8 +216,9 @@ Ensures the command is ran with LANG=C." eshell-info-banner--posix-shells) "sh"))) (with-temp-buffer - (call-process shell nil t nil "-c" (concat "LANG=C " command)) - (buffer-string)))) + (let ((default-directory (if eshell-info-banner-tramp-aware default-directory "~"))) + (process-file shell nil t nil "-c" (concat "LANG=C " command)) + (buffer-string))))) (defun eshell-info-banner--progress-bar-without-prefix (bar-length used total &optional newline) "Display a progress bar without its prefix.