# HG changeset patch # User Michael Albinus # Date 1201555488 0 # Node ID a67ed67d274aba095fc7cc9c1f06fbd685649aef # Parent 449ffc76e46391b2fcef237e9d5dddf7fdcadb41 * net/tramp.el (tramp-handle-shell-command): Use "/bin/sh -c" for the command. diff -r 449ffc76e463 -r a67ed67d274a lisp/net/tramp.el --- a/lisp/net/tramp.el Mon Jan 28 19:05:13 2008 +0000 +++ b/lisp/net/tramp.el Mon Jan 28 21:24:48 2008 +0000 @@ -3781,7 +3781,9 @@ (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)