Guest User

Untitled

a guest
Sep 29th, 2022
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. function gg() {
  2. pattern="-name '$1'"
  3. shift
  4. while [ "$#" != 0 -a "$1" != "-" ]; do
  5. pattern="$pattern -or -name '$1'"
  6. shift
  7. done
  8. shift
  9. eval "find . -type f '(' $pattern ')' -not -path */crashreports/* -not -path '*/external/chrome/*' -not -path '*/out/*' -not -path '*/.*/*' -print0" | xargs -0 grep -H --color $context -n "$@"
  10. }
  11.  
  12. function jg() {
  13. gg "*.java" - "$@"
  14. }
  15.  
  16. function cg() {
  17. gg "*.h" "*.c" "*.cc" "*.cpp" "*.hpp" "*.m" "*.mm" - "$@"
  18. }
  19.  
  20. function yg() {
  21. gg "*.gyp" "*.gypi" - "$@"
  22. }
  23.  
  24. function pg() {
  25. gg "*.py" - "$@"
  26. }
  27.  
  28. function ggg() {
  29. gg "*" - "$@"
  30. }
Add Comment
Please, Sign In to add comment