Skip to content

Instantly share code, notes, and snippets.

@keenahn
Created August 21, 2012 05:30
Show Gist options
  • Save keenahn/3412140 to your computer and use it in GitHub Desktop.
Save keenahn/3412140 to your computer and use it in GitHub Desktop.
BASH: grep current and subdirectories, only including rails files
grr(){
grep -iRn "$*" --include=*.{rb,erb,haml,html,css,scss,sass,json,js,coffee} .
}
# Put this in your .bashrc or equivalent
# then use like this:
# $ grr stuff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment