If you're not afraid of a a bit o' Unix/Linux/OSX command line delight, you're probably having grep
hanging on your tool belt.
One option you'll wonder how you could live without is --color
, which enables highlighting of the word or pattern you are grepping for. I find it so useful that I've put the following alias in my .bashrc
:
alias grep='grep --color=auto'
Another useful trick when you're working on version controlled source code (with Subversion for example) is disabling the recursive walk through the .svn
directories. For this I have the following in my .bashrc
:
# Exclude grepping through .svn folders.
GREP_OPTIONS="--exclude-dir=\.svn"
export GREP_OPTIONS
If the above makes you scream "good heavens, I wish I knew this decades ago", you should also consider the grep-killer ack, which offers the above (and many more) by default.