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

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

[elpa] master 5190412 234/348: Add `counsel-rg`


From: Oleh Krehel
Subject: [elpa] master 5190412 234/348: Add `counsel-rg`
Date: Sat, 8 Apr 2017 11:04:04 -0400 (EDT)

branch: master
commit 5190412554f102c08bb8626aa649d9d9707a4e91
Author: Manuel Uberti <address@hidden>
Commit: Manuel Uberti <address@hidden>

    Add `counsel-rg`
    
    This lets you use [ripgrep](https://github.com/BurntSushi/ripgrep) via 
Counsel.
---
 counsel.el | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/counsel.el b/counsel.el
index 90ea62c..591ed84 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1720,6 +1720,22 @@ This uses `counsel-ag' with `counsel-pt-base-command' 
replacing
   (let ((counsel-ag-base-command counsel-pt-base-command))
     (counsel-ag initial-input)))
 
+;;** `counsel-rg'
+(defcustom counsel-rg-base-command "rg %s"
+  "Used to in place of `counsel-rg-base-command' to search with
+ripgrep using `counsel-rg'."
+  :type 'string
+  :group 'ivy)
+
+;;;###autoload
+(defun counsel-rg (&optional initial-input)
+  "Grep for a string in the current directory using rg.
+This uses `counsel-ag' with `counsel-rg-base-command' replacing
+`counsel-ag-base-command'."
+  (interactive)
+  (let ((counsel-ag-base-command counsel-rg-base-command))
+    (counsel-ag initial-input)))
+
 ;;** `counsel-grep'
 (defcustom counsel-grep-base-command "grep -nE \"%s\" %s"
   "Format string to use in `cousel-grep-function' to construct



reply via email to

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