From 67fb495dfc488db2c64b7206697975b31ef43776 Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 7 Jan 2026 13:25:41 +0100 Subject: feat: Uses `env` when reading commit message from `/tmp/prev-ia-commit-message` This change ensures that the environment variables are correctly propagated when reading the commit message from the temporary file, resolving potential issues with variable expansion. --- functions/ia-commit.fish | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'functions') 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 (: )\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 (: ).\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 -- cgit v1.3-2-g11bf