projects
/
webi-installers
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c25c035
)
add rg options -uu and -v
author
AJ ONeal
<coolaj86@gmail.com>
Thu, 12 Nov 2020 03:01:09 +0000
(20:01 -0700)
committer
AJ ONeal
<coolaj86@gmail.com>
Thu, 12 Nov 2020 03:01:09 +0000
(20:01 -0700)
rg/README.md
patch
|
blob
|
history
diff --git
a/rg/README.md
b/rg/README.md
index d16167061d90ca7b6bfd5501e234c5126c0adfdd..614e326ecac034faab8802843079277eb519a08f 100644
(file)
--- a/
rg/README.md
+++ b/
rg/README.md
@@
-16,9
+16,9
@@
Use the `@beta` tag for pre-releases.
## Cheat Sheet
> Ripgrep (`rg`) is smart. It's like grep if grep were built for code. It
## 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
->
typically
outperforms grep in many use cases.
+> respects `.gitignore` and `.ignore`, has all of the sensible options you
want
+>
(colors, numbers, etc) turned on by default, is written in Rust, and typically
+> outperforms grep in many use cases.
```bash
rg <search-term> # searches recursively, ignoring .git, node_modules, etc
```bash
rg <search-term> # searches recursively, ignoring .git, node_modules, etc
@@
-31,3
+31,22
@@
rg 'function doStuff'
```bash
rg '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='
+```