From: Michael Albinus Date: Sun, 6 Feb 2022 08:43:13 +0000 (+0100) Subject: Make usage of su and sudo consistent in eshell (bug#53783) X-Git-Tag: emacs-29.0.90~2490 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=372d0e0cc1fccddea94b6eebfb59967221a70778;p=emacs.git Make usage of su and sudo consistent in eshell (bug#53783) * lisp/eshell/em-tramp.el (eshell/su, eshell/sudo): Use `tramp-default-host' instead of "localhost". --- diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el index 2afd4fe066a..aebbc36e71d 100644 --- a/lisp/eshell/em-tramp.el +++ b/lisp/eshell/em-tramp.el @@ -71,7 +71,7 @@ Become another USER during a login session.") (throw 'eshell-replace-command (let ((user "root") (host (or (file-remote-p default-directory 'host) - "localhost")) + tramp-default-host)) (dir (file-local-name (expand-file-name default-directory))) (prefix (file-remote-p default-directory))) (dolist (arg args) @@ -106,7 +106,7 @@ Execute a COMMAND as the superuser or another USER.") (throw 'eshell-external (let* ((user (or user "root")) (host (or (file-remote-p default-directory 'host) - "localhost")) + tramp-default-host)) (dir (file-local-name (expand-file-name default-directory))) (prefix (file-remote-p default-directory)) (default-directory