Function: tramp-smb-handle-shell-command

tramp-smb-handle-shell-command is a byte-compiled function defined in tramp-smb.el.gz.

Signature

(tramp-smb-handle-shell-command COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER)

Documentation

Like shell-command for Tramp files.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-smb.el.gz
(defun tramp-smb-handle-shell-command
    (command &optional output-buffer error-buffer)
  "Like `shell-command' for Tramp files."

  (let* (;; "& wait" is added by `dired-shell-stuff-it'.
	 (asynchronous
	  (string-match-p
	   (rx (? (* blank) "& wait") (* blank) "&" (* blank) eos) command))
	 (command (substring command 0 asynchronous))
	 (command (string-join `("\"" "&" "{" ,command "}" "\"") " "))
	 (command (if asynchronous (concat command "; exit &") command)))
    (tramp-handle-shell-command command output-buffer error-buffer)))