From 2b9e28e2e453a068eb8898fb83d1d71008fdf3ff Mon Sep 17 00:00:00 2001 From: Sylvain Chouleur Date: Fri, 24 Jan 2014 17:46:06 +0100 Subject: [PATCH] Fix tramp-sh-handle-start-file-process stdin * net/tramp-sh.el (tramp-sh-handle-start-file-process): The heredoc solution tho handle long command lines prevent the user to pass some input to the program using stdin. Use a coproc to pass the heredoc command to the shell and preserved stdin for user input. --- lisp/net/tramp-sh.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 65d5f27e967c..3f4f2bf77d7b 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2705,16 +2705,15 @@ 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 env PS1=%s %s" (tramp-shell-quote-argument localname) - (if heredoc "<