X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=rg%2FREADME.md;h=614e326ecac034faab8802843079277eb519a08f;hb=aa61db993471a5ec35fadbc050126735b9fc200a;hp=554c3ad48a387ab236daea8102c5069ff03c79a4;hpb=c77b2afba8be0e2aca21ad2647e7e847e4a8aa14;p=webi-installers%2F.git diff --git a/rg/README.md b/rg/README.md index 554c3ad..614e326 100644 --- a/rg/README.md +++ b/rg/README.md @@ -17,8 +17,8 @@ Use the `@beta` tag for pre-releases. > Ripgrep (`rg`) is smart. It's like grep if grep were built for code. It > respects `.gitignore` and `.ignore`, has all of the sensible options you want -> (colors, numbers, etc) turned on by default, is written in Rust, and simply -> outperforms grep in every imaginable way. R.I.P. grep. +> (colors, numbers, etc) turned on by default, is written in Rust, and typically +> outperforms grep in many use cases. ```bash rg # searches recursively, ignoring .git, node_modules, etc @@ -31,3 +31,22 @@ rg 'function doStuff' ```bash rg 'doStuff\(.*\)' ``` + +### Inverse Search + +Use `-v` to filter out all matches so that only non-matches are left. + +```bash +rg 'bar' | rg -v 'foobar' +``` + +### Disable Smart Filtering + +By default `rg` respects `.gitignore`, `.ignore`, `.git/info/exclude` and +ignores many types of hidden files, dot files, etc. + +You can use `-uu` to set all of the `--no-ignore-*` options and others. + +```bash +rg -uu 'SECRET=' +```