summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-unix.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell/em-unix.el')
-rw-r--r--lisp/eshell/em-unix.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index c27c18c52b..e40dbded60 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -748,7 +748,12 @@ external command."
(cmd (progn
(set-text-properties 0 (length args)
'(invisible t) args)
- (format "%s -n %s" command args)))
+ (format "%s -n %s"
+ (pcase command
+ ("egrep" "grep -E")
+ ("fgrep" "grep -F")
+ (x x))
+ args)))
compilation-scroll-output)
(grep cmd)))))
@@ -757,11 +762,11 @@ external command."
(eshell-grep "grep" args t))
(defun eshell/egrep (&rest args)
- "Use Emacs grep facility instead of calling external egrep."
+ "Use Emacs grep facility instead of calling external grep -E."
(eshell-grep "egrep" args t))
(defun eshell/fgrep (&rest args)
- "Use Emacs grep facility instead of calling external fgrep."
+ "Use Emacs grep facility instead of calling external grep -F."
(eshell-grep "fgrep" args t))
(defun eshell/agrep (&rest args)