diff options
author | Benjamin Franzke <benjaminfranzke@gmail.com> | 2020-11-26 14:35:14 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@gmail.com> | 2021-07-09 09:20:13 +0200 |
commit | 1e92145dd492e20af8de58b58d20ab6fc11f8999 (patch) | |
tree | caafafed345f69b46f45d8c6d03da6d73ca6723c | |
parent | b93138071c5322f1832cf997ba2ed2a8feacf57e (diff) | |
download | dotfiles-1e92145dd492e20af8de58b58d20ab6fc11f8999.tar.gz dotfiles-1e92145dd492e20af8de58b58d20ab6fc11f8999.tar.bz2 dotfiles-1e92145dd492e20af8de58b58d20ab6fc11f8999.zip |
Add cgrep function to grep in customer git repositories
-rw-r--r-- | .config/bash/functions.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.config/bash/functions.sh b/.config/bash/functions.sh index 9f04f70..3d587e1 100644 --- a/.config/bash/functions.sh +++ b/.config/bash/functions.sh @@ -247,3 +247,8 @@ wscan() { iw $dev scan | \ sed -e '/^[^\t]/{x;p;x;}' | sed -e '/./{H;$!d;}' -e "x;/$pattern/!d;" | sed "/^$/d" } + + +cgrep() { + find ~/src/qbus/ -type d -name '.git' -exec dirname '{}' \; -exec git --no-pager --git-dir={} --work-tree={}/.. grep --full-name --color=auto "$1" \; +} |