]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix "grep foo bar" in eshell
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 3 Dec 2020 10:18:45 +0000 (11:18 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 3 Dec 2020 10:18:45 +0000 (11:18 +0100)
* 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).

lisp/eshell/em-unix.el

index 153000438e716872aa14df6f33f767bf9828b9a2..c66f307bfeeb33a1eaf6a2c72cacf17d351df25d 100644 (file)
@@ -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")