Function: eshell-grep
eshell-grep is a byte-compiled function defined in em-unix.el.gz.
Signature
(eshell-grep COMMAND ARGS &optional MAYBE-USE-OCCUR)
Documentation
Generic service function for the various grep aliases.
It calls Emacs's grep utility if the command is not redirecting output, and if it's not part of a command pipeline. Otherwise, it calls the external command.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/em-unix.el.gz
(defun eshell-grep (command args &optional maybe-use-occur)
"Generic service function for the various grep aliases.
It calls Emacs's grep utility if the command is not redirecting output,
and if it's not part of a command pipeline. Otherwise, it calls the
external command."
(if (and maybe-use-occur eshell-no-grep-available)
(eshell-poor-mans-grep args)
(eshell-compile command (cons "-n" args)
(when eshell-plain-grep-behavior
'plain)
#'grep-mode)))