summaryrefslogtreecommitdiff
path: root/envsetup.sh
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2021-02-02 19:18:26 +0100
committerJeff Vander Stoep <jeffv@google.com>2021-02-02 19:18:26 +0100
commit1431ab8cf9701641e01f2bab3b3f298a5287d436 (patch)
tree99f7cece3b897ec70c89849319277cfaf300abd7 /envsetup.sh
parentd04a95a97f7debb806634a0b060b80b77c04a60f (diff)
envsetup: add rgrep for local Rust files
Test: cd external/rust/crates rgrep test Change-Id: I69fa770742c0dc20259346acaf1184c19675b3a7
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/envsetup.sh b/envsetup.sh
index c03e2cb7d2..a5f6b6df36 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -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.
- mgrep: Greps on all local Makefiles and *.bp files.
- owngrep: Greps on all local OWNERS files.
+- rgrep: Greps on all local Rust files.
- sepgrep: Greps on all local sepolicy files.
- sgrep: Greps on all local source files.
- godir: Go to the directory containing a file.
@@ -1037,6 +1038,12 @@ function jgrep()
-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()
{
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' \) \