summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/eshell/em-unix.el13
1 files changed, 4 insertions, 9 deletions
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 68276b22d95..40b83010f94 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -755,26 +755,21 @@ external command."
(eshell-stringify-list
(flatten-tree args)))
" "))
- (cmd (format "%s -nH %s"
- (pcase command
- ("egrep" "grep -E")
- ("fgrep" "grep -F")
- (x x))
- args))
+ (cmd (format "%s -n %s" command args))
compilation-scroll-output)
(grep cmd)))))
(defun eshell/grep (&rest args)
"Use Emacs grep facility instead of calling external grep."
- (eshell-grep "grep" args t))
+ (eshell-grep "grep" (append '("-H") args) t))
(defun eshell/egrep (&rest args)
"Use Emacs grep facility instead of calling external grep -E."
- (eshell-grep "egrep" args t))
+ (eshell-grep "grep" (append '("-EH") args) t))
(defun eshell/fgrep (&rest args)
"Use Emacs grep facility instead of calling external grep -F."
- (eshell-grep "fgrep" args t))
+ (eshell-grep "grep" (append '("-FH") args) t))
(defun eshell/agrep (&rest args)
"Use Emacs grep facility instead of calling external agrep."