branch: elpa/helm
commit 90cd6ad68c472b9908346ea3d39b63e2547fcc3d
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Add :header-name like ag in git-grep
---
 helm-grep.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/helm-grep.el b/helm-grep.el
index c0f0ab58f9..31ce39f97d 100644
--- a/helm-grep.el
+++ b/helm-grep.el
@@ -1306,6 +1306,12 @@ matching `helm-zgrep-file-extension-regexp' only."
      'default-directory helm-ff-default-directory) ;; [1]
     ;; Setup the source.
     (set source (helm-make-source src-name 'helm-grep-class
+                  :header-name (and (eq backend 'git)
+                                    (lambda (name)
+                                      (format "%s [%s]"
+                                              name
+                                              (abbreviate-file-name
+                                               helm-ff-default-directory))))
                   :backend backend
                   :pcre (string-match-p "\\`ack" com)))
     (helm

Reply via email to