addet some more functionality

This commit is contained in:
pika 2024-06-07 11:22:09 +02:00
parent 5b647e0d7e
commit 367ac1a0f5

View file

@ -112,13 +112,20 @@ function gsa
if command -v rg >/dev/null 2>&1
echo "-- for $dir --"
rg -i submodule (echo $dir/.gitmodules)
else
if command -v grep >/dev/null 2>&1
echo "-- for $dir --"
grep -i submodule (echo $dir/.gitmodules)
else
echo "-- no 'grep' or 'rg' found.. your okay?? --"
end
end
# ─< Prompt the user to enter the repository URL to add as a submodule >────────────────────
echo "-- enter the repository to add as a submodule --"
echo "-- (type 'quit' to quit) --"
read repo
if test "$repo" -eq "quit"
if [ "$repo" = "quit" ]
exit 1
end
@ -127,7 +134,7 @@ function gsa
echo "-- enter the relative path, where the submodule will be cloned to. (!! do it like this: ./path/to/clone/to) --"
echo "-- (type 'quit' to quit) --"
read -S path
if test "$path" -eq "quit"
if [ "$path" = "quit" ]
exit 1
end
@ -135,14 +142,14 @@ function gsa
echo "-- enter the branch to checkout (main/master..) --"
echo "-- (type 'quit' to quit) --"
read branch
if test "$branch" -eq "quit"
if [ "$branch" = "quit" ]
exit 1
end
echo "-- enter a name for the submodule --"
echo "-- (type 'quit' to quit) --"
read -l name
if test "$name" -eq "quit"
if [ "$name" = "quit" ]
exit 1
end