Use tramp-aware shell function

Fixes wrong report of disk usage when using
‘eshell-info-banner-tramp-aware’.
This commit is contained in:
Juergen Hoetzel 2022-05-15 09:00:35 +02:00 committed by Lucien Cartier-Tilet
parent 8c6e37cc61
commit 8e57add6c7
1 changed files with 3 additions and 2 deletions

View File

@ -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.