[zsh] more grep function
This commit is contained in:
parent
2c78121c1e
commit
fb60eb255f
@ -21,7 +21,7 @@ alias xte='nohup xterm &' # xte lancera un xterm qui ne se fermera pas si on fer
|
||||
alias minicom='minicom -c on'
|
||||
alias vims='vim --servername vimserver'
|
||||
alias vimo='vim --servername vimserver --remote-tab'
|
||||
alias agrep='grep --exclude=.git --exclude-dir=out --exclude-dir=prebuilts --exclude-dir=docs'
|
||||
alias agrep='grep --exclude=.git --exclude-dir=out --exclude-dir=prebuilts --exclude-dir=docs --exclude=tags --exclude=cscope.out'
|
||||
|
||||
#Extension Alias
|
||||
alias -s html=$BROWSER
|
||||
|
@ -113,6 +113,20 @@ resgrep () {
|
||||
done
|
||||
}
|
||||
|
||||
sgrep() {
|
||||
find -E . -name .repo -prune -o -name .git -prune -o -type f -iregex '.*\.(c|h|cc|cpp|S|java|xml|sh|mk|aidl)' -print0 | xargs -0 grep --color -n "$@"
|
||||
}
|
||||
|
||||
mangrep() {
|
||||
find . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o -type f -name 'AndroidManifest.xml' -print0 | xargs -0 grep --color -n "$@"
|
||||
}
|
||||
|
||||
sepgrep() {
|
||||
find . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o -name sepolicy -type d -print0 | xargs -0 grep --color -n -r --exclude-dir=\.git "$@"
|
||||
}
|
||||
|
||||
|
||||
|
||||
gettop ()
|
||||
{
|
||||
local TOPFILE=build/core/envsetup.mk;
|
||||
|
Loading…
Reference in New Issue
Block a user