Limit the search to one directory or file.
Section: Basic search
Search inside a specific path
bash
bash
rg FIXME src/Explanation
Useful when you know the subsystem or package you want to inspect.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Basic search
Search recursively in the current directory
Search for a pattern using ripgrep's recursive defaults.
Use smart case matching
Lowercase patterns search case-insensitively; uppercase triggers case-sensitive search.
List only file names with matches
Return matching file paths without printing the matching lines.