changeset 106310:334a4954c17e

* net/tramp.el (tramp-maybe-open-connection): Open the remote shell with "exec" when possible. This prevents trailing prompts in `start-file-process'.
author Michael Albinus <michael.albinus@gmx.de>
date Sun, 29 Nov 2009 20:05:23 +0000
parents 9470a3d1abee
children 12c2a6b10caf
files lisp/net/tramp.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/tramp.el	Sun Nov 29 20:04:08 2009 +0000
+++ b/lisp/net/tramp.el	Sun Nov 29 20:05:23 2009 +0000
@@ -7227,6 +7227,9 @@
 		      (?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 @@
 		;; 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)