Function: with-editor-shell-command

with-editor-shell-command is an autoloaded, interactive and byte-compiled function defined in with-editor.el.

Signature

(with-editor-shell-command COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER ENVVAR)

Documentation

Like shell-command or with-editor-async-shell-command.

If COMMAND ends with "&" behave like the latter, else like the former.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/with-editor-20260301.1317/with-editor.el
;;;###autoload
(defun with-editor-shell-command
    (command &optional output-buffer error-buffer envvar)
  "Like `shell-command' or `with-editor-async-shell-command'.
If COMMAND ends with \"&\" behave like the latter,
else like the former."
  (interactive (with-editor-shell-command-read-args "Shell command: "))
  (if (string-match "&[ \t]*\\'" command)
      (with-editor-async-shell-command
       command output-buffer error-buffer envvar)
    (shell-command command output-buffer error-buffer)))