in programming, shell, tips

I was just now inspired by this video from Luke Pighetti on how he manages to get around a 380k loc codebase. In it, he pipes ag into fzf for a full search including file names and contents. I’m not sure why I’ve never though to do that before.

I don’t have ag installed, and anyway, I’m a bit of a Rust fan, so here’s what I’d use:

rg . -n | sk

The -n flag to rg makes sure line numbers pop up in search results. I could say sk --case=respect if I want non-smart case search, and use ' before a term to disable fuzzy matching on the fly.

Neat.