emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/helm c3cd741a27: Modify helm-grep-ag-command default


From: ELPA Syncer
Subject: [nongnu] elpa/helm c3cd741a27: Modify helm-grep-ag-command default
Date: Wed, 14 Sep 2022 07:59:10 -0400 (EDT)

branch: elpa/helm
commit c3cd741a27247334c5f25998442c377cd3b36c78
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Modify helm-grep-ag-command default
---
 helm-grep.el | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/helm-grep.el b/helm-grep.el
index b222f96529..91e5055ebd 100644
--- a/helm-grep.el
+++ b/helm-grep.el
@@ -325,8 +325,16 @@ will have no effect, use customize instead."
            (define-key helm-grep-map (kbd "<left>")  nil))))
 
 (defcustom helm-grep-ag-command
-  "ag --line-numbers -S --color --nogroup %s -- %s %s"
-  "The default command for AG, PT or RG.
+  (cond ((executable-find "rg")
+         "rg --color=always --smart-case --search-zip --no-heading 
--line-number %s -- %s %s")
+        ((executable-find "ag")
+         "ag --line-numbers -S --color --nogroup %s -- %s %s"))
+  "The default command for RG or AG.
+
+Prefer RG by default if available.
+
+Update: PT is still mentionned in this documentation but it seems it
+doesn't exists anymore, or at least it is no more maintained.
 
 Takes three format specs, the first for type(s), the second for
 pattern and the third for directory.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]