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".
This commit is contained in:
parent
d90fd58c02
commit
372d0e0cc1
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue