Function: eshell--isearch-setup
eshell--isearch-setup is a byte-compiled function defined in
em-hist.el.gz.
Signature
(eshell--isearch-setup)
Documentation
Set up Isearch to search the input history.
Intended to be added to isearch-mode-hook in an Eshell buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/em-hist.el.gz
(defun eshell--isearch-setup ()
"Set up Isearch to search the input history.
Intended to be added to `isearch-mode-hook' in an Eshell buffer."
(when (and
;; Eshell is busy running a foreground process
(not eshell-foreground-command)
(or eshell--force-history-isearch
(eq eshell-history-isearch t)
(and (eq eshell-history-isearch 'dwim)
(>= (point) eshell-last-output-end))))
(setq isearch-message-prefix-add "history ")
(setq-local isearch-lazy-count nil)
(setq-local isearch-search-fun-function #'eshell-history-isearch-search
isearch-message-function #'eshell-history-isearch-message
isearch-wrap-function #'eshell-history-isearch-wrap
isearch-push-state-function #'eshell-history-isearch-push-state)
(add-hook 'isearch-mode-end-hook #'eshell-history-isearch-end nil t)))