summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@gmail.com>2020-11-26 14:35:14 +0100
committerBenjamin Franzke <benjaminfranzke@gmail.com>2021-07-09 09:20:13 +0200
commit1e92145dd492e20af8de58b58d20ab6fc11f8999 (patch)
treecaafafed345f69b46f45d8c6d03da6d73ca6723c
parentb93138071c5322f1832cf997ba2ed2a8feacf57e (diff)
downloaddotfiles-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.sh5
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" \;
+}