rg

rg

TLDR

Recursively search the current directory for a regex pattern

>_ rg [pattern]
copy

Search for pattern including all .gitignored and hidden files

>_ rg -uu [pattern]
copy

Search for a pattern only in a certain filetype (e.g., html, css, etc.)

>_ rg -t [filetype] [pattern]
copy

Search for a pattern only in a subset of directories

>_ rg [pattern] [set_of_subdirs]
copy

Search for a pattern in files matching a glob (e.g., README.*)

>_ rg [pattern] -g [glob]
copy

Only list matched files (useful when piping to other commands)

>_ rg --files-with-matches [pattern]
copy

Show lines that do not match the given pattern

>_ rg --invert-match [pattern]
copy

Search a literal string pattern

>_ rg -F [string]
copy

Copied to clipboard
free 100$ digital ocean credit