summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-12-03 11:18:45 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2020-12-03 11:18:45 +0100
commit4b25ffd3b8ffb854c2458efc4914829ead9a0f79 (patch)
tree52b2f7bd9bdbde32e5e7934b3bf670efe728f111 /lisp/eshell
parent6422750b4f8cbc7d1da49b72873deeb18390e379 (diff)
downloademacs-4b25ffd3b8ffb854c2458efc4914829ead9a0f79.tar.gz
emacs-4b25ffd3b8ffb854c2458efc4914829ead9a0f79.tar.bz2
emacs-4b25ffd3b8ffb854c2458efc4914829ead9a0f79.zip
Fix "grep foo bar" in eshell
* lisp/eshell/em-unix.el (eshell-grep): Use the -H switch so that we always get the file name, so that `M-x next-error' and friends work (bug#22330).
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-unix.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 153000438e7..c66f307bfee 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -754,7 +754,7 @@ external command."
(eshell-stringify-list
(flatten-tree args)))
" "))
- (cmd (format "%s -n %s"
+ (cmd (format "%s -nH %s"
(pcase command
("egrep" "grep -E")
("fgrep" "grep -F")