[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 3237f0563c 1/2: Fix default grep AG command according
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 3237f0563c 1/2: Fix default grep AG command according to issue #2475 |
Date: |
Fri, 4 Feb 2022 02:58:12 -0500 (EST) |
branch: elpa/helm
commit 3237f0563cbe845eaa8b0a40e18e7b74e741cc8f
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix default grep AG command according to issue #2475
Fix also accordingly docstrings.
---
helm-grep.el | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/helm-grep.el b/helm-grep.el
index 2aceda4338..eab689bab2 100644
--- a/helm-grep.el
+++ b/helm-grep.el
@@ -241,7 +241,17 @@ doing."
"A list of additional parameters to pass to grep-ag pipe command.
Use parameters compatibles with the backend you are using
\(i.e. AG for AG, PT for PT or RG for RG)
+Here are the commands where you may want to add switches:
+
+ ag -S --color
+ rg -N -S --color=?
+
+For RG the value of --color= is computed according to the --color=
+value used in `helm-grep-ag-command'.
+Note also that by default the \"--\" option is always used, you don't
+need to add it here.
+
You probably don't need to use this unless you know what you are
doing."
:group 'helm-grep
@@ -1453,7 +1463,7 @@ non-file buffers."
;; https://github.com/BurntSushi/ripgrep
(defcustom helm-grep-ag-command
- "ag --line-numbers -S --color --nogroup %s %s %s"
+ "ag --line-numbers -S --color --nogroup %s -- %s %s"
"The default command for AG, PT or RG.
Takes three format specs, the first for type(s), the second for
@@ -1468,12 +1478,12 @@ colorization of backend, however it is still supported.
For ripgrep here is the command line to use:
- rg --color=always --smart-case --no-heading --line-number %s %s %s
+ rg --color=always --smart-case --no-heading --line-number %s -- %s %s
And to customize colors (always for ripgrep) use something like this:
rg --color=always --colors 'match:bg:yellow' --colors 'match:fg:black'
-\--smart-case --no-heading --line-number %s %s %s
+\--smart-case --no-heading --line-number %s -- %s %s
This will change color for matched items from foreground red (the
default) to a yellow background with a black foreground. Note