Last active
July 6, 2021 08:48
-
-
Save sebdah/129fb35951671495a07a6e33dac51f29 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
# list all current branch names | |
function gBa | |
set -lx root ~/go/src/github.com/saltside | |
for r in (ls -1 $root) | |
if ! test -d $root/$r | |
continue | |
end | |
cd $root/$r | |
set_color blue; | |
echo -ne "$r" | |
set_color normal; | |
set -lx branch (git branch --show-current) | |
echo -ne " ($branch)\n" | |
end | |
end |
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
# gLa is pulling all repositories | |
function gLa | |
set -lx root ~/go/src/github.com/saltside | |
for r in (ls -1 $root) | |
if ! test -d $root/$r | |
continue | |
end | |
cd $root/$r | |
set_color blue; | |
echo -ne "Pulling $r.." | |
set_color normal; | |
git pull > /dev/null | |
if test $status -gt 0 | |
echo -e " ❌" | |
else | |
set -lx branch (git branch --show-current) | |
echo -ne " ($branch)" | |
set_color green; | |
echo -e " ✅" | |
end | |
end | |
set_color normal; | |
end |
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
# gSua is updating submodules for all repositories | |
function gSua | |
set -lx root ~/go/src/github.com/saltside | |
for r in (ls -1 $root) | |
if ! test -d $root/$r | |
continue | |
end | |
cd $root/$r | |
set_color blue; | |
echo -ne "Updating submodules $r.." | |
set_color normal; | |
git submodule update --init --recursive &> /dev/null | |
if test $status -gt 0 | |
echo -e " ❌" | |
else | |
set_color green; | |
echo -e " ✅" | |
end | |
end | |
set_color normal; | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment