X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=rg%2FREADME.md;h=2ae72418269a7b2f7ad39bcdf8e927f1f12ae35c;hb=d70f58eb23fc96a012131b430e7c04bf06de1a9e;hp=5737a020bc3ed309c6e7bcc3ca1ffba332c87805;hpb=51036a0917a1fadf20d18e90e9bd9ecf294b8f90;p=webi-installers%2F.git diff --git a/rg/README.md b/rg/README.md index 5737a02..2ae7241 100644 --- a/rg/README.md +++ b/rg/README.md @@ -5,20 +5,14 @@ tagline: | Ripgrep is a git and sourcecode-aware drop-in grep replacement. --- -## Updating `rg` - -```bash -webi rg@stable -``` - -Use the `@beta` tag for pre-releases. +To update or switch versions, run `webi rg@stable` (or `@v13.0`, `@beta`, etc). ## Cheat Sheet > 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. +> (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 +25,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=' +```