Mercurial > emacs
comparison lisp/net/tramp.el @ 88051:a67ed67d274a
* net/tramp.el (tramp-handle-shell-command): Use "/bin/sh -c" for
the command.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Mon, 28 Jan 2008 21:24:48 +0000 |
parents | 2a4ab582b2a6 |
children | 948a005afe18 |
comparison
equal
deleted
inserted
replaced
88050:449ffc76e463 | 88051:a67ed67d274a |
---|---|
3779 | 3779 |
3780 (defun tramp-handle-shell-command | 3780 (defun tramp-handle-shell-command |
3781 (command &optional output-buffer error-buffer) | 3781 (command &optional output-buffer error-buffer) |
3782 "Like `shell-command' for Tramp files." | 3782 "Like `shell-command' for Tramp files." |
3783 (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) | 3783 (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) |
3784 (args (split-string (substring command 0 asynchronous) " ")) | 3784 ;; We cannot use `shell-file-name' and `shell-command-switch', |
3785 ;; they are variables of the local host. | |
3786 (args (list "/bin/sh" "-c" (substring command 0 asynchronous))) | |
3785 (output-buffer | 3787 (output-buffer |
3786 (cond | 3788 (cond |
3787 ((bufferp output-buffer) output-buffer) | 3789 ((bufferp output-buffer) output-buffer) |
3788 ((stringp output-buffer) (get-buffer-create output-buffer)) | 3790 ((stringp output-buffer) (get-buffer-create output-buffer)) |
3789 (output-buffer (current-buffer)) | 3791 (output-buffer (current-buffer)) |