emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 0ad1c0d: * lisp/net/tramp.el (tramp-handle-make-process): Handle


From: Michael Albinus
Subject: master 0ad1c0d: * lisp/net/tramp.el (tramp-handle-make-process): Handle shell commands.
Date: Fri, 18 Dec 2020 07:33:39 -0500 (EST)

branch: master
commit 0ad1c0d51cd3e1b02deedee9b05647fcd0734076
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    * 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 a4865ec..30818fe 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]