-
-
Save brianegge/1545221 to your computer and use it in GitHub Desktop.
export GREP_OPTIONS=--color=auto | |
ffind () | |
{ | |
find . -name ".svn" -prune -o -name "CVS" -prune -o -name ".hg" -prune -o -exec grep --color=auto "$@" {} + | |
} |
Thanks for the tip Hugh! I just installed ack-grep on my Mac. I'm not allowed to download stuff off the internet at work, so I'll have to see if they have this perl module available, or if they can get it setup.
Looks like a very nice tool for code searching. We have OpenGrok servers setup at work, but I find most the time I'd rather just grep the files I have checked out for whatever I'm looking for.
Here is my .ackrc file:
--type-set=fm=.ftl
--type-set=mako=.mako
--type-set=spec=.spec
--type-set=scss=.scss
--type-set=coffee=.coffee
--type-add=python=.mako
--type-set=ini=.ini
--type-set=ejs=.ejs
--type-set=txt=.txt
--type-set=css=.css
--type-set=fm=.ftl
--type-set=mako=.mako
--type-set=spec=.spec
--type-set=scss=.scss
--type-set=coffee=.coffee
--type-add=python=.mako
--type-set=ini=.ini
--type-set=ejs=.ejs
--type-set=txt=.txt
--type-set=css=.css
I'm guessing that this greps files but omits searching in version control directories. Why not check out ack-grep?
sudo apt-get install ack-grep