Skip to content

Improve selection prompt UX; Add single-character shortcut keys mnemonics  #380

@webstoreportal

Description

@webstoreportal

We should aim for a quick win in keystroke reduction here without detracting from existing slow prompts.

  • Allow user to confirm an option by first-letter (or second letter, in name clash) as a keyboard shortcut

answers = questionary.prompt(questions, style=cz.style)

def questions(self) -> List[Dict[str, Any]]:

per Python Questionary dependency docs
https://questionary.readthedocs.io/en/stable/pages/api_reference.html#questionary.Choice.shortcut_key

Slightly surprised no one has taken the opportunity to improve developer quality of life here. In commitizen-tools and cz-cli. Is there another alternative workflow we are missing out on?

Balancing forced verbose arrow navigation prompts vs command-line direct parsing

Adding the keyboard shortcut could be a happy medium solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions