From d9f5bd995eafa8b3f122801a033aaef414a86b2c Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Sun, 1 Nov 2015 23:54:33 +0100 Subject: [PATCH] Added gitall --- zsh/.zsh/10-helpers.zsh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/zsh/.zsh/10-helpers.zsh b/zsh/.zsh/10-helpers.zsh index 5e321c5..1995c16 100644 --- a/zsh/.zsh/10-helpers.zsh +++ b/zsh/.zsh/10-helpers.zsh @@ -7,3 +7,20 @@ mkpasswd2() { LEN=${1:-30} base64 < /dev/urandom | fold -w $LEN | sed 1q } + +gitall() { + ROOT=$(pwd) + find . -name '.git' | while read repo; do + repodir=$(dirname "$repo") + reponame=$(basename "$repodir") + cd "$repodir" + + echo "===================================" + echo "===> $reponame" + echo "===================================" + + git $@ + + cd "$ROOT"; + done +}