Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested default for counsel-rg #1393

jnboehm opened this issue Jan 4, 2018 · 2 comments

Suggested default for counsel-rg #1393

jnboehm opened this issue Jan 4, 2018 · 2 comments


Copy link

jnboehm commented Jan 4, 2018

I think using smart case as the default would make the rg utility slightly more useful as it would then automatically try to detect whether it should search case sensitively or not. This is also the same behavior as the one in the program ag.

The change would simply changing the flag -i to -S. I have pasted a patch below if that's helpful.

From b2d7624c1541ec3e7afeac80c9013b8d880bb09a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Niklas=20B=C3=B6hm?= <>
Date: Thu, 31 Aug 2017 15:42:09 +0200
Subject: [PATCH] Use smart case instead of ignoring it

 counsel.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index 5d2f129..92850c5 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2043,7 +2043,7 @@ This uses `counsel-ag' with `counsel-ack-base-command' replacing
 ;;** `counsel-rg'
-(defcustom counsel-rg-base-command "rg -i --no-heading --line-number --color never %s ."
+(defcustom counsel-rg-base-command "rg -S --no-heading --line-number --color never %s ."
   "Alternative to `counsel-ag-base-command' using ripgrep."
   :type 'string
   :group 'ivy)

Copy link

mssdvd commented Jan 4, 2018

It is also the same behavior of swiper

@abo-abo abo-abo closed this as completed in 2929c46 Jan 4, 2018
Copy link

abo-abo commented Jan 4, 2018


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

3 participants