Set
GREP_OPTIONS='-RI --color=auto'
. Or install ack.
I’m looking for TODO entries in source code on a machine that does not have Ack installed. It does have GNU grep, though.
Obviously I want to search subdirectories. I can choose between --recursive
, -R
, or using rgrep
on this particular machine.
I am usually searching through source code. I hardly ever want binary files to match. That means --binary-file=without-match
or -I
.
Finally, I like pretty colors. The --color=auto
option makes me happy.
That leaves me with this invocation.
Or maybe the short form would be easier.
Probably smartest to look at what environment variables I could set up in order to skip remembering this stuff at all.
Pop that in my .bashrc
and I’m set.
All right. Back to work.
Backlinks
Added to vault 2024-01-15. Updated on 2024-01-26