m-manu
9 hours ago
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". I called it "scgrep" ("source code grep" for short).
It's written it in pure Go (zero library dependencies).
I have been using it ever since and it's been working great.