From b0b5cc00ccdfe9cf138f3730257a02350f154087 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 23 May 2024 20:06:54 +0200 Subject: [PATCH] addet better functionality --- functions/git.fish | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/functions/git.fish b/functions/git.fish index 4735c0d..e37aacb 100644 --- a/functions/git.fish +++ b/functions/git.fish @@ -15,11 +15,11 @@ function gsa echo "-- enter the relative path, where the submodule will be cloned to. (don't use fist / or ./) --" read -l -S path - echo "-- enter a name for the submodule --" - read -l name + # echo "-- enter a name for the submodule --" + # read -l name # ─< Ask the user for confirmation if the constructed command looks correct >─────────────── - echo "git submodule add --branch $branch --name $name $repo $path" + echo "git submodule add --branch $branch $repo $path" echo "-- does this command look right to you? [y/n] --" read -l comm @@ -27,7 +27,8 @@ function gsa switch $comm # ─< If the user inputs 'y' or 'Y', execute the git submodule add command >───────────────── case 'y' 'Y' - git submodule add --branch $branch --name $name $repo $path + git submodule add --branch $branch $repo $path + git submodule update --init --recursive git add . git commit -m "Addet $name as a submodule" git push