Skip to content

gum choose: autoselect option under cursor when none is selected #990

@kerwanp

Description

@kerwanp

We started using gum to improve the DX with our scripts and when used for the first time by team members they always encounter the same issue with multi-select. They will want to select only one element and assume they just have to press Enter instead of Space (to select) + Enter.

Describe the solution you'd like
This could be added under a flag --required (or a more specific one) which make the selection required. And if no element has been selected, it selects the one under the cursor.

Describe alternatives you've considered
One of the workaround is to re-ask selection if the output is empty and saying that no option has been selected.

I'm willing to contribute.

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