Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fdf26c2 authored by Jeffrey Vander Stoep's avatar Jeffrey Vander Stoep Committed by Gerrit Code Review
Browse files

Merge "envsetup: add rgrep for local Rust files"

parents e484f03f 1431ab8c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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' \) \