Last active
February 16, 2022 03:16
-
-
Save utisam/f78916c83c58b5862c9d3aa4fe899749 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
SILENT=0 | |
if [[ $1 = "-s" ]]; then | |
shift | |
SILENT=1 | |
fi | |
declare -a COMMAND=(git --no-pager $argv) | |
if [[ $1 = "!" ]]; then | |
shift | |
COMMAND=($argv) | |
fi | |
for D in $(find -L $PWD \( -name vendor -o -name node_modules \) -prune -o -type d -name .git -print -prune) | |
do | |
cd $(dirname $D) | |
[[ $SILENT = 0 ]] && echo -e "\e[37;44;1m${PWD/${HOME}/~}\e[m" | |
$COMMAND[*] | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment