Ripgrep Search
Use rg to search the working tree. It respects .gitignore by default and
is dramatically faster than grep -r.
Common invocations
rg 'pattern'— search all tracked text filesrg -n 'pattern' src/— include line numbers, limit to a directoryrg -t py 'def main'— restrict to a file typerg -l 'TODO'— list matching files only
Tips
Quote patterns to keep the shell from expanding them. Use -F for fixed
strings when the pattern contains regex metacharacters.