From 0ad1c0d51cd3e1b02deedee9b05647fcd0734076 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 18 Dec 2020 13:33:31 +0100 Subject: [PATCH] * lisp/net/tramp.el (tramp-handle-make-process): Handle shell commands. --- lisp/net/tramp.el | 9 +++++++++ 1 file changed, 9 insertions(+) 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) -- 2.39.2