Ripgrep: Add --smart-case option

Created on 24 Sep 2016  路  4Comments  路  Source: BurntSushi/ripgrep

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.

enhancement

Most helpful comment

@kastiglione Please see #196.

All 4 comments

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.

Could this be enabled by default via an environment variable?

@kastiglione Please see #196.

rg -S <your search>

or

rg --smart-case <your search>

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

Was this page helpful?
0 / 5 - 0 ratings