rg –help | Make help useful on Windows |
rg -l NEEDLE | List matching files only |
rg -c NEEDLE | List matching files, including a count |
rg -i NEEDLE | Search case-insensitively |
rg –no-filename NEEDLE | Don’t print filenames, handy when you care about the match more than the file |
rg -v NEEDLE | Invert matching: show lines that do not match |
rg NEEDLE README.md | Search only in specified file(s) |
rg -c –sort modified NEEDLE | Sort the results (-sortr to reverse) |
rg -g ‘!*.nuspec’ NEEDLE | Search in everything but *.nuspec files |
rg -e NEEDLE1 -e NEEDLE2 | Search for multiple patterns |
rg -z NEEDLE | Search in gzip, bzip2, xz, LZ4, LZMA, Brotli and Zstd compressed files |
rg –type-list | Displays built-in available types and their corresponding globs |
rg -tcs -tconfig | Search in file types cs and config |