This commit is contained in:
Janik von Rotz committed 2025-04-28 11:59:52 +02:00
1 parent b2ab6184cc
commit 4daf211cbc
1 file changed
+8 -3
+8 -3
View File
@@ -1,3 +1,4 @@
#!/bin/bash
function commit-with-llm() {
mkdir -p tmp
@@ -29,10 +30,14 @@ EOF
less "$RESULT_FILE"
# Ask for confirmation before updating files
read -p "Do you want to commit with this message? (y/n): " CONFIRM
if [[ ! "$CONFIRM" =~ ^[Yy]$ ]]; then
read -p "Do you want to commit or edit before commit the message? (y/e/n): " CONFIRM
if [[ ! "$CONFIRM" =~ ^[YyEe]$ ]]; then
exit 0
fi
git commit -m "$RESULT"
if [[ "$CONFIRM" =~ ^[Ee]$ ]]; then
git commit --amend -m "$RESULT"
else
git commit -m "$RESULT"
fi
}