Merge "envsetup: add rgrep for local Rust files" am: 5fdf26c2d2

Original change: https://android-review.googlesource.com/c/platform/build/+/1570742

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id37e691cdff05e93dd7a41c1e3318138064f7fe4
This commit is contained in:
Jeffrey Vander Stoep 2021-02-19 17:35:28 +00:00 committed by Automerger Merge Worker
commit a36d04850d

View file

@ -27,6 +27,7 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y
- mangrep: Greps on all local AndroidManifest.xml files. - mangrep: Greps on all local AndroidManifest.xml files.
- mgrep: Greps on all local Makefiles and *.bp files. - mgrep: Greps on all local Makefiles and *.bp files.
- owngrep: Greps on all local OWNERS files. - owngrep: Greps on all local OWNERS files.
- rgrep: Greps on all local Rust files.
- sepgrep: Greps on all local sepolicy files. - sepgrep: Greps on all local sepolicy files.
- sgrep: Greps on all local source files. - sgrep: Greps on all local source files.
- godir: Go to the directory containing a file. - godir: Go to the directory containing a file.
@ -1037,6 +1038,12 @@ function jgrep()
-exec grep --color -n "$@" {} + -exec grep --color -n "$@" {} +
} }
function rgrep()
{
find . -name .repo -prune -o -name .git -prune -o -name out -prune -o -type f -name "*\.rs" \
-exec grep --color -n "$@" {} +
}
function cgrep() function cgrep()
{ {
find . -name .repo -prune -o -name .git -prune -o -name out -prune -o -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' -o -name '*.hpp' \) \ find . -name .repo -prune -o -name .git -prune -o -name out -prune -o -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' -o -name '*.hpp' \) \