From b8bfcf96e8e78484cccade13fdb6a8a8697a66b9 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 28 Jan 2008 21:25:26 +0000 Subject: [PATCH] * net/tramp.el (tramp-handle-shell-command): Use "/bin/sh -c" for the command. --- lisp/ChangeLog | 5 +++++ lisp/net/tramp.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1e2dcf1e558..d467535a186 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-01-28 Michael Albinus + + * net/tramp.el (tramp-handle-shell-command): Use "/bin/sh -c" for + the command. + 2008-01-28 Vinicius Jose Latorre * whitespace.el: Moved to obsolete dir. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index b9e6a279644..eb68c8302aa 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3781,7 +3781,9 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1." (command &optional output-buffer error-buffer) "Like `shell-command' for Tramp files." (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) - (args (split-string (substring command 0 asynchronous) " ")) + ;; We cannot use `shell-file-name' and `shell-command-switch', + ;; they are variables of the local host. + (args (list "/bin/sh" "-c" (substring command 0 asynchronous))) (output-buffer (cond ((bufferp output-buffer) output-buffer) -- 2.39.5