From 2b7bc58e47eb0775bc8b3b32a3a4f5da05850a04 Mon Sep 17 00:00:00 2001 From: Ayo Date: Mon, 23 Jun 2025 12:19:10 +0200 Subject: [PATCH] feat(git): commit reads message and accepts files to commit --- git.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/git.sh b/git.sh index 90fbc74..9787cd1 100755 --- a/git.sh +++ b/git.sh @@ -9,8 +9,6 @@ command=$1 journal_dir="${notes_dir}/Journal" month_dir=$(date +"%m %b") -getopts "t" typora; #check if -t flag is given - if [ "$1" = "stat" ]; then { git add . @@ -22,9 +20,9 @@ if [ "$1" = "stat" ]; then elif [ "$1" = "commit" ]; then { git add . - git status - git commit -m "$2" - } || { + read -p "Message: " message + git commit -m "$message" $2 $3 $4 $5 $6 $7 $8 $9 + }|| { # Report; TODO: write log echo ">>> Commit failed" }