Limit preprocessors to matching paths.
Section: Preprocessors and compressed files
Apply preprocessing only to certain files
bash
bash
rg --pre 'pandoc -t plain' --pre-glob '*.docx' 'roadmap' docs/Explanation
`--pre-glob` avoids paying a preprocessing cost for unrelated files.
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 Preprocessors and compressed files
Use a preprocessor for unsupported formats
Transform file content before ripgrep searches it.
Preview a simple replacement
Show what matched lines would look like after substitution.