JPeer264 / node-semantic-git-commit-cli

A CLI for semantic git commits
https://www.npmjs.com/package/semantic-git-commit-cli
MIT License
147 stars 11 forks source link

Use rawlist for "type" prompt #83

Closed jwhitmarsh closed 4 years ago

jwhitmarsh commented 4 years ago

This would enable a keyboard shortcut to jump to a type (screenshot below). What are the maintainers' thoughts on this? Maybe it could be behind a config option? Happy to put in a PR if this idea has merit.

image

Edit: I want to add - thanks for this great tool, I was thinking of creating something like the rebase-editor but for commits, but you beat me to it!

JPeer264 commented 4 years ago

Numbers are a great idea actually - is it still possible to move around with the arrow keys and press enter on the highlighted one? (like the behavior right now)

Btw your tool looks pretty neat :)

jwhitmarsh commented 4 years ago

You can move around using the arrow keys, but not j & f (which is supported by the standard list prompt).

This is the change that is required, if you just want to test it out locally:

image

Rebased-editor is great! Not mine though, just my inspiration for looking for a commit version and leading me to this!

JPeer264 commented 4 years ago

I am not sure about this, as it will be just in this list. All other lists will have a different (the current) behavior, this could be kinda misleading and confusing. Maybe the autocomplete plugin makes more sense here? https://github.com/mokkabonna/inquirer-autocomplete-prompt

With that the current behavior stays the same, and the terms are also searchable. Here the terms could also be prefixed with fixed numbers to be searchable. What you think about that?

jwhitmarsh commented 4 years ago

Ah cool, the autocomplete prompt looks great! I agree that that makes more sense, it also means that people don't have to remember that "1 is fix, 2 is feat" etc.

JPeer264 commented 4 years ago

I am gladly accepting PRs. I am kinda busy RN and just could implement it by end of this week :)

JPeer264 commented 4 years ago

Added in v3.6.0