On macOS: "brew install ripgrep" - then use "rg searchterm" to search all nested files in the current directory that contain searchterm.
You may be using it without realizing already: the code search feature in VS Code uses ripgrep under the hood.
On macOS: "brew install ripgrep" - then use "rg searchterm" to search all nested files in the current directory that contain searchterm.
You may be using it without realizing already: the code search feature in VS Code uses ripgrep under the hood.
The result is instantaneous and only found out recently it uses ripgrep from my co-worker.
I wouldn't want to miss anything on my home directory or repository-specific dotfiles.
Edit: oh, this is different from --no-ignore.
Usually I'm searching code for things like variable names, so actually case-sensitive searches are a better default for me.
On Unix, you can just do `alias rg="rg -S"`, and you get smart-case by default. :-) Or if you truly always want case insensitive by default, then `alias rg="rg -i"`.
"make ripgrep similar to grep" is certainly one goal, but there are other goals that compete with that and whether or not ripgrep matches grep's behavior with respect to case sensitivity is only one small piece of that.
It was proposed to enable --smart-case by default: https://github.com/BurntSushi/ripgrep/issues/178
I usually know when I want case insensitive match - and I frequently want case-sensitivity with all lowercase search terms. Eg: doing a search for methods or variables in ruby - where "model" is right, but "Model" is a class or module (and vice-versa - but then smart case would work).
While I do allow for breaking changes between major versions, I don't really see myself ever doing any kind of major breaking change. Especially one that subtly changes match semantics in a really major way.
By default, ripgrep does not search a bunch of files, in particular anything gitignored and anything with a leading dot (which the docs call "hidden"):
https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#a...
These flags override that.