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

Closed
jnboehm opened this issue Jan 4, 2018 · 2 comments

Comments

@jnboehm
Copy link

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?= <mail@jnboehm.com>
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)
-- 
2.14.1

@mssdvd

This comment has been minimized.

Copy link
Contributor

commented Jan 4, 2018

It is also the same behavior of swiper

@abo-abo abo-abo closed this in 2929c46 Jan 4, 2018

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Jan 4, 2018

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.