]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp-sh.el (tramp-sh-handle-start-file-process): Use "&&"
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 6 Feb 2014 08:49:34 +0000 (09:49 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 6 Feb 2014 08:49:34 +0000 (09:49 +0100)
instead of ";" in order to avoid additional prompts.  Let heredoc
scripts read from tty.  (Bug#16582)
(tramp-send-command): No special handling of heredocs, it isn't
necessary anymore.

lisp/ChangeLog
lisp/net/tramp-sh.el

index 7e37e36378687a7089a570a4df6f052675e0617e..c0fc7696313f8c0a7acf22be4569f046a6f97a4e 100644 (file)
@@ -1,3 +1,11 @@
+2014-02-06  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-sh-handle-start-file-process): Use "&&"
+       instead of ";" in order to avoid additional prompts.  Let heredoc
+       scripts read from tty.  (Bug#16582)
+       (tramp-send-command): No special handling of heredocs, it isn't
+       necessary anymore.
+
 2014-02-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start
index 67a517a719c6e83722a01ab2dab18fdd529ebe32..d6486de797f81b085a13ff344d166b49776479de 100644 (file)
@@ -2711,7 +2711,7 @@ the result will be a local, non-Tramp, filename."
                   (cdr args)))
           (command
            (when (stringp program)
-             (format "cd %s; exec %s env PS1=%s %s"
+             (format "cd %s && exec %s env PS1=%s %s"
                      (tramp-shell-quote-argument localname)
                      (if heredoc (format "<<'%s'" tramp-end-of-heredoc) "")
                      ;; Use a human-friendly prompt, for example for `shell'.
@@ -2720,7 +2720,7 @@ the result will be a local, non-Tramp, filename."
                               (file-remote-p default-directory)
                               tramp-initial-end-of-output))
                      (if heredoc
-                         (format "%s\n%s\n%s"
+                         (format "%s\n(\n%s\n) </dev/tty\n%s"
                                  program (car args) tramp-end-of-heredoc)
                        (mapconcat 'tramp-shell-quote-argument
                                   (cons program args) " ")))))
@@ -4571,14 +4571,6 @@ function waits for output unless NOOUTPUT is set."
       ;; We mark the command string that it can be erased in the output buffer.
       (tramp-set-connection-property p "check-remote-echo" t)
       (setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark)))
-    ;; Some busyboxes tend to close the connection when we use the
-    ;; following syntax for here-documents.  This we cannot test; it
-    ;; shall be set via `tramp-connection-properties'.
-    (when (and (string-match (format "<<'%s'" tramp-end-of-heredoc) command)
-              (not (tramp-get-connection-property vec "busybox" nil)))
-      ;; Unset $PS1 when using here documents, in order to avoid
-      ;; multiple prompts.
-      (setq command (concat "(PS1= ; " command "\n)")))
     ;; Send the command.
     (tramp-message vec 6 "%s" command)
     (tramp-send-string vec command)