Function: shell-command-mode

shell-command-mode is an interactive and byte-compiled function defined in shell.el.gz.

Signature

(shell-command-mode)

Documentation

Major mode for the output of asynchronous shell-command.

In addition to any hooks its parent mode comint-mode might have run, this mode runs the hook shell-command-mode-hook, as the final or penultimate step during initialization.

Probably introduced at or before Emacs version 30.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/shell.el.gz
(define-derived-mode shell-command-mode comint-mode "Shell"
  "Major mode for the output of asynchronous `shell-command'."
  (setq-local font-lock-defaults '(shell-font-lock-keywords t))
  ;; See comments in `shell-mode'.
  (setq-local ansi-color-apply-face-function #'shell-apply-ansi-color)
  (setq list-buffers-directory (expand-file-name default-directory)))