From: Michael Albinus Date: Fri, 18 Dec 2020 12:33:31 +0000 (+0100) Subject: * lisp/net/tramp.el (tramp-handle-make-process): Handle shell commands. X-Git-Tag: emacs-28.0.90~4669 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0ad1c0d51cd3e1b02deedee9b05647fcd0734076;p=emacs.git * lisp/net/tramp.el (tramp-handle-make-process): Handle shell commands. --- diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index a4865ec4f22..30818fe7e64 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3790,6 +3790,15 @@ It does not support `:stderr'." (unless (or (null stderr) (bufferp stderr)) (signal 'wrong-type-argument (list #'bufferp stderr))) + ;; Quote shell command. + (when (and (= (length command) 3) + (stringp (nth 0 command)) + (string-match-p "sh$" (nth 0 command)) + (stringp (nth 1 command)) + (string-equal "-c" (nth 1 command)) + (stringp (nth 2 command))) + (setcar (cddr command) (tramp-shell-quote-argument (nth 2 command)))) + (let* ((buffer (if buffer (get-buffer-create buffer)