hn • r/hackernews
Comment on: Source Code Grep: Use your own grep, but make it source code aware
grep is great. It comes pre-installed on your OS. In fact, a search using grep is faster than the search on your IDE when there is no code index!But, one key pain when using grep for searching in your source code or configuration files? A `grep -r` command scans all files (including binary files ) and not just source code files, making it slow. Sometimes, terribly slow.Yes, I'm aware of source-code-aware search tools like ripgrep (rg), ack etc. - But these tools reimplement grep logic!Annoyed by this, a few years back, I wrote a grep wrapper that runs your systems grep on "source code files".