chore(git-all): improve python and shell versions

This commit is contained in:
Michele Cereda
2024-08-07 22:30:37 +02:00
parent cf54a16bab
commit 05f199ec7f
5 changed files with 83 additions and 5 deletions

19
snippets/git.fish Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env fish
function git-all
if ! which -s parallel
echo "GNU parallel not found" >&2
return
end
argparse -s 'c/command=' 'p/path=+' 'r/recursive' -- $argv
or return
if test "$_flag_recursive" = '-r' || test "$_flag_recursive" = '--recursive'
set repositories (find $_flag_path -type 'd' -name '.git' -exec dirname {} +)
else
set repositories $_flag_path
end
parallel --color-failed --tagstring "{/}" "git -C {} $_flag_command" ::: $repositories
end