+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
(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'.
(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) " ")))))
;; 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)