From: Michael Albinus Date: Sun, 29 Nov 2009 20:05:23 +0000 (+0000) Subject: * net/tramp.el (tramp-maybe-open-connection): Open the remote X-Git-Tag: emacs-pretest-23.1.90~177 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e2a421af398d805b37e957ac2166929d65fa8c4b;p=emacs.git * net/tramp.el (tramp-maybe-open-connection): Open the remote shell with "exec" when possible. This prevents trailing prompts in `start-file-process'. --- diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 795c7eefc38..678c8cc22e0 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -7227,6 +7227,9 @@ connection if a previous connection has died for some reason." (?t . ,tmpfile)) command (concat + ;; We do not want to see the trailing local prompt in + ;; `start-file-process'. + (unless (memq system-type '(windows-nt)) "exec ") command " " (mapconcat (lambda (x) @@ -7236,7 +7239,7 @@ connection if a previous connection has died for some reason." ;; Local shell could be a Windows COMSPEC. It doesn't ;; know the ";" syntax, but we must exit always for ;; `start-file-process'. "exec" does not work either. - " && exit || exit")) + (if (memq system-type '(windows-nt)) " && exit || exit"))) ;; Send the command. (tramp-message vec 3 "Sending command `%s'" command)