]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (tramp-maybe-open-connection): Open the remote
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 29 Nov 2009 20:05:23 +0000 (20:05 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 29 Nov 2009 20:05:23 +0000 (20:05 +0000)
shell with "exec" when possible.  This prevents trailing prompts
in `start-file-process'.

lisp/net/tramp.el

index 795c7eefc383f13a93dbdbc9b90776c6bd3515b4..678c8cc22e0bea47ab18ecbaacfe85141262644e 100644 (file)
@@ -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)