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

[Feature request] Accept the commit message suggestion #128

Open
ryo246912 opened this issue Jan 10, 2025 · 0 comments
Open

[Feature request] Accept the commit message suggestion #128

ryo246912 opened this issue Jan 10, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@ryo246912
Copy link

Is your feature request related to a problem? Please describe.

Although commit message suggestions are displayed, I have to type a similar message from scratch.

Describe the solution you'd like

I think commit message suggestions are a cool feature!
I think it would be more convenient if, when entering a message similar to the suggestion, you could accept the suggestion first and then modify part of the wording.
This would help:

  • Maintain consistency in commit messages (effectively preventing typos or inconsistencies in phrasing)
  • Reduce the amount of typing when entering commit messages, making it easier to generate concise messages

As an example, when prompted for input, you could type a specific key (e.g., Tab or Right key) to accept the suggestion and allow further editing, which would produce the behavior I envision.

Describe alternatives you've considered

None.

Additional context

I think this is a great tool! I would love to use it actively, so I’m submitting a few feature requests.

  • While I suggested accepting suggestions as-is, there might be further improvements:

    • The cursor movement seems limited to moving one line up or down. It might be useful to add ctrl+a (move to the beginning) and ctrl+e (move to the end) functionality.
    • Currently, only one suggestion is displayed, but it would be great to have the ability to show multiple suggestions (perhaps by switching between them using the ↓↑ keys).
    • After answering the final question, a confirmation prompt asking if the input is correct could be helpful, allowing the user to review the final message like czg
    ~/.local/share/chezmoi % czg
    
    [email protected]
    
    ? Select the type of change that you're committing: feat:     A new feature
    ? Denote the SCOPE of this change (optional): empty
    ? Write a SHORT, IMPERATIVE tense description of the change:[Infinity more chars allowed]x
    ? Provide a LONGER description of the change (optional). Use "|" to break new line:
    ? List any BREAKING CHANGES (optional). Use "|" to break new line:
    ? Select the ISSUES type of change (optional): skip
    ###--------------------------------------------------------###
    feat: x
    ###--------------------------------------------------------###
    
    ? Are you sure you want to proceed with the commit above? (Yneh) y
    >> Yes

Apologies for the feature requests.
I really liked this tool, so I thought of several feature ideas without considering the implementation complexity.
However, if any of them seem useful to you, I would be thrilled if you would consider them.

@ryo246912 ryo246912 added the enhancement New feature or request label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant