aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorJoakim Verona2013-02-20 00:04:24 +0100
committerJoakim Verona2013-02-20 00:04:24 +0100
commit10fc3c3866ede374437a72f2e8c1cd7c0f51a8fa (patch)
tree9f089e0c12e94575e0c679f4b4deb47c807ac26d /lisp/eshell
parentb6f8e0e0e844020efd614d3655b67a646bcffb9a (diff)
parent81ed22e4cad625e297314bc609d146e7e62695db (diff)
downloademacs-10fc3c3866ede374437a72f2e8c1cd7c0f51a8fa.tar.gz
emacs-10fc3c3866ede374437a72f2e8c1cd7c0f51a8fa.zip
auto upstream
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-unix.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index f6dd0d5e990..94508d71592 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -1040,6 +1040,7 @@ Show wall-clock time elapsed during execution of COMMAND.")
1040 1040
1041(defun eshell/su (&rest args) 1041(defun eshell/su (&rest args)
1042 "Alias \"su\" to call Tramp." 1042 "Alias \"su\" to call Tramp."
1043 (require 'tramp)
1043 (setq args (eshell-stringify-list (eshell-flatten-list args))) 1044 (setq args (eshell-stringify-list (eshell-flatten-list args)))
1044 (let ((orig-args (copy-tree args))) 1045 (let ((orig-args (copy-tree args)))
1045 (eshell-eval-using-options 1046 (eshell-eval-using-options
@@ -1077,6 +1078,7 @@ Become another USER during a login session.")
1077 1078
1078(defun eshell/sudo (&rest args) 1079(defun eshell/sudo (&rest args)
1079 "Alias \"sudo\" to call Tramp." 1080 "Alias \"sudo\" to call Tramp."
1081 (require 'tramp)
1080 (setq args (eshell-stringify-list (eshell-flatten-list args))) 1082 (setq args (eshell-stringify-list (eshell-flatten-list args)))
1081 (let ((orig-args (copy-tree args))) 1083 (let ((orig-args (copy-tree args)))
1082 (eshell-eval-using-options 1084 (eshell-eval-using-options
@@ -1111,8 +1113,6 @@ Execute a COMMAND as the superuser or another USER.")
1111 (format "%s|sudo:%s@%s:%s" 1113 (format "%s|sudo:%s@%s:%s"
1112 (substring prefix 0 -1) user host dir) 1114 (substring prefix 0 -1) user host dir)
1113 (format "/sudo:%s@%s:%s" user host dir)))) 1115 (format "/sudo:%s@%s:%s" user host dir))))
1114 ;; Ensure, that Tramp has connected to that construct already.
1115 (ignore (file-exists-p default-directory))
1116 (eshell-named-command (car orig-args) (cdr orig-args)))))))) 1116 (eshell-named-command (car orig-args) (cdr orig-args))))))))
1117 1117
1118(put 'eshell/sudo 'eshell-no-numeric-conversions t) 1118(put 'eshell/sudo 'eshell-no-numeric-conversions t)