Function: eshell-forward-matching-input
eshell-forward-matching-input is an interactive and byte-compiled
function defined in em-prompt.el.gz.
Signature
(eshell-forward-matching-input REGEXP ARG)
Documentation
Search forward through buffer for command input that matches REGEXP.
With prefix argument N, search for Nth next match. If N is negative, find the Nth previous match.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/em-prompt.el.gz
(defun eshell-forward-matching-input (regexp arg)
"Search forward through buffer for command input that matches REGEXP.
With prefix argument N, search for Nth next match. If N is
negative, find the Nth previous match."
(interactive (eshell-regexp-arg "Forward input matching (regexp): "))
(let ((direction (if (> arg 0) 1 -1))
(count (abs arg)))
(unless (catch 'found
(while (> count 0)
(eshell-next-prompt direction)
(when (and (string-match regexp (field-string))
(= (setq count (1- count)) 0))
(throw 'found t))))
(message "Not found")
(ding))))