Ramblings of an aging IT geek
← Ramblings of an aging IT geek
tooling

i finally stopped reaching for grep

After years of muscle memory, ripgrep and fd have quietly replaced grep and find in my daily work.

A terminal session lit up on a mechanical keyboard

I held out on rg and fd for an embarrassingly long time. Not for any good reason, just the usual one: grep -rn is welded into my fingers, and learning a new flag set felt like effort I'd rather spend elsewhere. Then I ran ripgrep across a large repo, watched it finish before I'd let go of the enter key, and that was that.

The speed is the headline, but it isn't why they stuck. It's the defaults. rg foo already skips .git, already respects my .gitignore, already recurses, already colours sensibly. With grep I was forever appending --exclude-dir=node_modules like some incantation to ward off a wall of minified rubbish. fd pattern is the same story against find: a sane syntax I can actually remember instead of find . -name '*.go' -type f typed slightly wrong on the first attempt.

# the old reflex
grep -rn --include='*.go' "handleRequest" . --exclude-dir=vendor

# what I type now
rg -t go handleRequest

I still keep grep and find sharp, because they're on every box I'll ever SSH into and ripgrep usually isn't. That's the deal: the old tools are the lingua franca, the new ones are what I install first on any machine I'll spend real time on. Giving up the habit was the hard part. The tools were the easy bit.