function gsa echo "-- enter the repository to add as a submodule --" read repo echo "-- enter the branch to checkout (main/master..) --" read branch echo "-- enter the relative path, where the submodule will be cloned to. (don't use fist / or ./) --" read -S path echo "-- does this command look right to you? [y/n] --" echo "git submodule add --branch $branch --name $path $repo" read comm switch $comm case [Yy] git submodule add --branch $branch --name $path $repo case [Nn] echo "-- all right, just try again :) --" end end