Skip to content

Commit

Permalink
Fix show_echo
Browse files Browse the repository at this point in the history
  • Loading branch information
marissamarym committed Feb 26, 2024
1 parent 0129e6b commit c93dda5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ To generate a commit message and commit it immediately:
commitm -e
```

To generate a commit message with a custom prefix (default is 🤖):
To generate a commit message with a custom prefix (✨) (default is 🤖):

```bash
commitm -p ✨
Expand Down
15 changes: 8 additions & 7 deletions src/commitm.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ show_warning() {
echo -e "\e[33mWarning: $1\e[0m" >&2
}

show_echo() {
if [[ "$suppress_output" == false ]]; then
echo -e "$1"
fi
}

commitm() {
local prefix="🤖" # Default prefix
local use_prefix=true
Expand Down Expand Up @@ -91,6 +85,13 @@ commitm() {
fi
done

show_echo() {
if [[ "$suppress_output" == false ]]; then
echo -e "$1"
fi
}


# Execute the commit with the commit message
make_commit() {
local commit_msg_format="%s"
Expand Down Expand Up @@ -136,7 +137,7 @@ commitm() {
g) prompt_mod_description="More general";;
esac

show_echo -e "\n$prompt_mod_description prompt: \e[1m\e[36m$(cat "$commit_message_temp_file")\e[0m\n"
show_echo "\n$prompt_mod_description prompt: \e[1m\e[36m$(cat "$commit_message_temp_file")\e[0m\n"
}

# Generate the commit message with llm
Expand Down

0 comments on commit c93dda5

Please sign in to comment.