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

Add --smart-case option #70

Closed
Tarmean opened this issue Sep 24, 2016 · 4 comments
Closed

Add --smart-case option #70

Tarmean opened this issue Sep 24, 2016 · 4 comments
Labels
enhancement An enhancement to the functionality of the software.

Comments

@Tarmean
Copy link

Tarmean commented Sep 24, 2016

Description:
When smart case is enabled then ignorecase is implicitly enabled if the query doesn't contain uppercase characters .

This saves the user from thinking about case sensitivity in virtually all common cases. The option is offered by a number of other search tools like ag or vim's regex search. I'd like this as rg's default but aliasing it obviously would work just as well.

@BurntSushi
Copy link
Owner

Yeah, I actually dislike this option very much, so I'm pretty opposed to using it by default. I'm fine with a new flag.

@BurntSushi BurntSushi added the enhancement An enhancement to the functionality of the software. label Sep 24, 2016
amsharma91 added a commit to amsharma91/ripgrep that referenced this issue Sep 27, 2016
It does what it says on the tin.

Closes BurntSushi#70.
@kastiglione
Copy link
Contributor

Could this be enabled by default via an environment variable?

@BurntSushi
Copy link
Owner

@kastiglione Please see #196.

@verhovsky
Copy link

verhovsky commented Nov 8, 2019

rg -S <your search>

or

rg --smart-case <your search>

There's also -i/--ignore-case and -s/--case-sensitive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement to the functionality of the software.
Projects
None yet
Development

No branches or pull requests

4 participants