Skip to content

Instantly share code, notes, and snippets.

@fcamel
Created October 22, 2009 10:20
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 fcamel/215881 to your computer and use it in GitHub Desktop.
Save fcamel/215881 to your computer and use it in GitHub Desktop.
19 function gp() {
20 if [ "$1" = "-p" ]; then
21 shift
22 \ls *.py */*.py | perl -ne 'print $_ if !($_ =~ /.*_test\.py/)' | xargs grep -i --color $1
23 elif [ "$1" = "-t" ]; then
24 shift
25 \ls *.py */*.py | perl -ne 'print $_ if $_ =~ /.*_test\.py/' | xargs grep -i --color $1
26 else
27 g "$1" *.py */*.py
28 fi
29 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment