Function: eshell-command-mode

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

Signature

(eshell-command-mode &optional ARG)

Documentation

Minor mode for eshell-command input.

C-g abort-recursive-edit
C-j exit-minibuffer
M-RET exit-minibuffer
RET exit-minibuffer

This is a minor mode. If called interactively, toggle the Eshell-Command mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate eshell-command-mode(var)/eshell-command-mode(fun).

The mode's hook is called both when the mode is enabled and when it is disabled.

Key Bindings

Aliases

eshell-return-exits-minibuffer (obsolete since 28.1)

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/eshell.el.gz
(define-minor-mode eshell-command-mode
  "Minor mode for `eshell-command' input.
\\{eshell-command-mode-map}"
  :keymap (let ((map (make-sparse-keymap)))
            (define-key map [(control ?g)] 'abort-recursive-edit)
            (define-key map [(control ?m)] 'exit-minibuffer)
            (define-key map [(control ?j)] 'exit-minibuffer)
            (define-key map [(meta control ?m)] 'exit-minibuffer)
            map))