feat(git) repass arguments to gitCommit if has args other than default command

This commit is contained in:
Ayo Ayco 2025-06-23 13:20:14 +02:00
parent 75ab6597a3
commit 7140ca55e0

8
git.sh
View file

@ -21,9 +21,10 @@ gitStatus() {
gitCommit() { gitCommit() {
{ {
echo "gitCommit called"
git add . git add .
read -p "Message: " message read -p "Message: " message
git commit -m "$message" $2 $3 $4 $5 $6 $7 $8 $9 git commit -m "$message" $*
}|| { }|| {
# Report; TODO: write log # Report; TODO: write log
echo ">>> Commit failed" echo ">>> Commit failed"
@ -47,6 +48,9 @@ elif [ "$1" = "push" ]; then
gitPush gitPush
else else
gitStatus gitStatus
gitCommit $2 $3 $4 $5 $6 $7 $8 $9 if ! [ "$1" = "g" ]; then
gitCommit $*
fi
gitCommit
gitPush gitPush
fi fi