summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-tramp.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2024-04-01 18:50:20 +0800
committerSean Whitton <spwhitton@spwhitton.name>2024-04-01 18:50:20 +0800
commit0fef2018445b257bf26814e6659bc2ff5b270d77 (patch)
tree2310ce1fd8781a6203ec56e2f985f6adfcc2278d /lisp/eshell/em-tramp.el
parent3a8546615a38337dc991f6546ade63a372edc2ca (diff)
parent49f76dcc17055e60569b6096e8ea3c9961ebbf63 (diff)
downloademacs-0fef2018445b257bf26814e6659bc2ff5b270d77.tar.gz
Merge branch 'athena/unstable' into athena/bookworm-backports
Diffstat (limited to 'lisp/eshell/em-tramp.el')
-rw-r--r--lisp/eshell/em-tramp.el22
1 files changed, 10 insertions, 12 deletions
diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el
index 90f9c6cf78d..efb37225651 100644
--- a/lisp/eshell/em-tramp.el
+++ b/lisp/eshell/em-tramp.el
@@ -121,12 +121,11 @@ Uses the system sudo through Tramp's sudo method."
:usage "[(-u | --user) USER] (-s | --shell) | COMMAND
Execute a COMMAND as the superuser or another USER.")
(let ((dir (eshell--method-wrap-directory default-directory "sudo" user)))
- (if shell
- (throw 'eshell-replace-command
- (eshell-parse-command "cd" (list dir)))
- (throw 'eshell-external
- (let ((default-directory dir))
- (eshell-named-command (car args) (cdr args))))))))
+ (throw 'eshell-replace-command
+ (if shell
+ (eshell-parse-command "cd" (list dir))
+ `(let ((default-directory ,dir))
+ (eshell-named-command ',(car args) ',(cdr args))))))))
(put 'eshell/sudo 'eshell-no-numeric-conversions t)
@@ -144,12 +143,11 @@ Uses the system doas through Tramp's doas method."
:usage "[(-u | --user) USER] (-s | --shell) | COMMAND
Execute a COMMAND as the superuser or another USER.")
(let ((dir (eshell--method-wrap-directory default-directory "doas" user)))
- (if shell
- (throw 'eshell-replace-command
- (eshell-parse-command "cd" (list dir)))
- (throw 'eshell-external
- (let ((default-directory dir))
- (eshell-named-command (car args) (cdr args))))))))
+ (throw 'eshell-replace-command
+ (if shell
+ (eshell-parse-command "cd" (list dir))
+ `(let ((default-directory ,dir))
+ (eshell-named-command ',(car args) ',(cdr args))))))))
(put 'eshell/doas 'eshell-no-numeric-conversions t)