Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add copy option for commit message #118

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

law-chain-hot
Copy link

@law-chain-hot law-chain-hot commented Feb 27, 2023

Description

This pull request adds a new feature to aicommits, which allows users to copy a message directly to their clipboard when modifying is required. The new option is called No, but copy the message to clipboard.

Additionally, this feature helps to resolve #115 and #111 (the prefix issues) and close #110 (modify issue) etc.

Changes Made

  • Added a new option called No, but copy the message to clipboard. When this option is selected, the commit message will be copied to the clipboard, and users can then modify it or add prefix.

Example

image

Thank you for considering this pull request.

Other infomation

@privatenumber Hi, since clipboardy is imported, in order to import its node entry, I added --export-condition=node in pkgroll build base on your document, is it ok?

@law-chain-hot law-chain-hot changed the title feat: add copy option for message feat: Add copy option for commit message Feb 27, 2023
@aslakhol
Copy link

aslakhol commented Feb 27, 2023

It seems a bit outside of the purpose of aicommits, at least if we're considering adding an external dependency. I think it makes more sense to have a flag that when set makes aicommits echo the suggested commit message. That way the user could just pipe the output into the clipboard with something like aicommits -v | pbcopy.

But I see that others could disagree here.

@law-chain-hot
Copy link
Author

It seems a bit outside of the purpose of aicommits, at least if we're considering adding an external dependency. I think it makes more sense to have a flag that when set makes aicommits echo the suggested commit message. That way the user could just pipe the output into the clipboard with something like aicommits -v | pbcopy.

But I see that others could disagree here.

Yes, I think flag is also a good way to solve prefix problem, there is no conflict between flag and one more option of copy. In fact, both of them can be used simultaneously.

As for using pipe to copy output, the purpose of this library is to reduce the user's workload when submitting code, while providing a beautiful command line UI is to simplify user operations. But using pipe moves the focus from the beautiful UI back to the plain and complex command line

So I feel that providing the user with the ability to copy via UI prompt is the right direction :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Allow user to modify the commit message themselves on terminal. adding commit prefixes and emojis
2 participants