* eshell/em-unix.el (eshell/sudo): When we have an ad-hoc

remote definition of `default-directory', ensure we can connect.
This commit is contained in:
Michael Albinus 2012-09-02 11:57:19 +02:00
parent 63dd1c6fa4
commit 7340619402
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2012-09-02 Michael Albinus <michael.albinus@gmx.de>
* eshell/em-unix.el (eshell/sudo): When we have an ad-hoc
remote definition of `default-directory', ensure we can connect.
2012-09-02 Juri Linkov <juri@jurta.org>
Toggle whitespace matching mode with M-s SPC.

View file

@ -1110,6 +1110,8 @@ Execute a COMMAND as the superuser or another USER.")
(format "%s|sudo:%s@%s:%s"
(substring prefix 0 -1) user host dir)
(format "/sudo:%s@%s:%s" user host dir))))
;; Ensure, that Tramp has connected to that construct already.
(file-exists-p default-directory)
(eshell-named-command (car orig-args) (cdr orig-args))))))))
(put 'eshell/sudo 'eshell-no-numeric-conversions t)