summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfunctions/ia-commit.fish5
1 files changed, 2 insertions, 3 deletions
diff --git a/functions/ia-commit.fish b/functions/ia-commit.fish
index 8b35b63..1ea3135 100755
--- a/functions/ia-commit.fish
+++ b/functions/ia-commit.fish
@@ -12,7 +12,7 @@ function _ask
git commit -m (cat /tmp/prev-ia-commit-message | head -n 1)
else if [ $response = e ]
$EDITOR /tmp/prev-ia-commit-message
- cat /tmp/prev-ia-commit-message | head -n 1
+ env cat /tmp/prev-ia-commit-message
_ask
return $status
else if [ $response = r ]
@@ -25,10 +25,9 @@ function _ask
end
function ia-commit
- echo -e "Write a professional git commit message based on the a diff below. \nDo not preface the commit with anything, use the present tense, return the full sentence, and use the conventional commits specification (<type in lowercase>: <subject>)\n\n-----\n\n$(git diff --staged)" | hailper -p b-code | tee /tmp/prev-ia-commit-message
+ echo -e "Write a professional git commit message based on the diff below. DO NOT CODE. You goal is only to propose a **professionnal git commit message** corresponding to the git diff below. Here are the rulses\n\n1. Do not preface the commit message with greeting. \n2. Use the present tense. \n3. The first line MUST be a sentence that describe the following diff. \n4. The first line MUST follow the conventional commits specification (<type in lowercase>: <commit message>).\n\n\nHere is the git diff:\n\n\n----------\n\n\n$(git diff --staged)" | hailper -p commit-message | tee /tmp/prev-ia-commit-message
_ask
set -l ret $status
rm /tmp/prev-ia-commit-message 2>/dev/null
return $ret
-
end