Skip to content

Instantly share code, notes, and snippets.

@skwp
Created December 16, 2008 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skwp/36698 to your computer and use it in GitHub Desktop.
Save skwp/36698 to your computer and use it in GitHub Desktop.
# A fast, clean grep for code in a rails directory
function g {
grep -nwrsI --color $1 app/ config/ vendor/ script/ test/ db/ public/
# The version below shows two lines of context around the match
# grep -nwrsIC1 --color $1 app/ config/ vendor/ script/ test/ db/ public/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment