aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2014-02-06 09:49:34 +0100
committerMichael Albinus2014-02-06 09:49:34 +0100
commit629de968455d2b4632fbe9db860ae4ac7e933b9b (patch)
tree24168ed917982b08674f90662ab48ac597ee8190
parentd978812ac8320194f0111cd6b690b86b575a5d76 (diff)
downloademacs-629de968455d2b4632fbe9db860ae4ac7e933b9b.tar.gz
emacs-629de968455d2b4632fbe9db860ae4ac7e933b9b.zip
* 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.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/net/tramp-sh.el12
2 files changed, 10 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7e37e363786..c0fc7696313 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12014-02-06 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-sh.el (tramp-sh-handle-start-file-process): Use "&&"
4 instead of ";" in order to avoid additional prompts. Let heredoc
5 scripts read from tty. (Bug#16582)
6 (tramp-send-command): No special handling of heredocs, it isn't
7 necessary anymore.
8
12014-02-06 Stefan Monnier <monnier@iro.umontreal.ca> 92014-02-06 Stefan Monnier <monnier@iro.umontreal.ca>
2 10
3 * emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start 11 * emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 67a517a719c..d6486de797f 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2711,7 +2711,7 @@ the result will be a local, non-Tramp, filename."
2711 (cdr args))) 2711 (cdr args)))
2712 (command 2712 (command
2713 (when (stringp program) 2713 (when (stringp program)
2714 (format "cd %s; exec %s env PS1=%s %s" 2714 (format "cd %s && exec %s env PS1=%s %s"
2715 (tramp-shell-quote-argument localname) 2715 (tramp-shell-quote-argument localname)
2716 (if heredoc (format "<<'%s'" tramp-end-of-heredoc) "") 2716 (if heredoc (format "<<'%s'" tramp-end-of-heredoc) "")
2717 ;; Use a human-friendly prompt, for example for `shell'. 2717 ;; Use a human-friendly prompt, for example for `shell'.
@@ -2720,7 +2720,7 @@ the result will be a local, non-Tramp, filename."
2720 (file-remote-p default-directory) 2720 (file-remote-p default-directory)
2721 tramp-initial-end-of-output)) 2721 tramp-initial-end-of-output))
2722 (if heredoc 2722 (if heredoc
2723 (format "%s\n%s\n%s" 2723 (format "%s\n(\n%s\n) </dev/tty\n%s"
2724 program (car args) tramp-end-of-heredoc) 2724 program (car args) tramp-end-of-heredoc)
2725 (mapconcat 'tramp-shell-quote-argument 2725 (mapconcat 'tramp-shell-quote-argument
2726 (cons program args) " "))))) 2726 (cons program args) " ")))))
@@ -4571,14 +4571,6 @@ function waits for output unless NOOUTPUT is set."
4571 ;; We mark the command string that it can be erased in the output buffer. 4571 ;; We mark the command string that it can be erased in the output buffer.
4572 (tramp-set-connection-property p "check-remote-echo" t) 4572 (tramp-set-connection-property p "check-remote-echo" t)
4573 (setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark))) 4573 (setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark)))
4574 ;; Some busyboxes tend to close the connection when we use the
4575 ;; following syntax for here-documents. This we cannot test; it
4576 ;; shall be set via `tramp-connection-properties'.
4577 (when (and (string-match (format "<<'%s'" tramp-end-of-heredoc) command)
4578 (not (tramp-get-connection-property vec "busybox" nil)))
4579 ;; Unset $PS1 when using here documents, in order to avoid
4580 ;; multiple prompts.
4581 (setq command (concat "(PS1= ; " command "\n)")))
4582 ;; Send the command. 4574 ;; Send the command.
4583 (tramp-message vec 6 "%s" command) 4575 (tramp-message vec 6 "%s" command)
4584 (tramp-send-string vec command) 4576 (tramp-send-string vec command)