You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
For example I want user not just say yesno but to have additional choice, for example cancel or view details. Triple choice is quite frequent in cli dialogs.
Describe the solution you'd like
Would be good if gum supports multiple choices for gum confirm. To behave similar to gum choose but with horizontal selection menu.
Perhaps it should return exit code with selection number. For example for Yes/No it will be backward compatible 0/1, but for Yes/Details/No it will be 0/1/2 so that No still return non-zero exit code., which is backward compatible again.
Describe alternatives you've considered
There is gum choose but it have a different UI/UX purpose. (And returns different values).
Additional context
Alternatively, this can be an option to gum choose to display option horizontally and return selection text. That way gum choose --horizontal Yes No would simulate gum confirm somehow. But this will require parsing text (and this can introduce mistakes when text is edited but its parser not). Maybe in that case gum choose could have extension to options format, like gum select --horizontal 0=Yes 1=No 4=Cancel and if user selects "Cancel" it will print string "4" instead of "Cancel".
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
For example I want user not just say
yes
no
but to have additional choice, for examplecancel
orview details
. Triple choice is quite frequent in cli dialogs.Describe the solution you'd like
Would be good if gum supports multiple choices for
gum confirm
. To behave similar togum choose
but with horizontal selection menu.Perhaps it should return exit code with selection number. For example for Yes/No it will be backward compatible 0/1, but for Yes/Details/No it will be 0/1/2 so that No still return non-zero exit code., which is backward compatible again.
Describe alternatives you've considered
There is
gum choose
but it have a different UI/UX purpose. (And returns different values).Additional context
Alternatively, this can be an option to
gum choose
to display option horizontally and return selection text. That waygum choose --horizontal Yes No
would simulategum confirm
somehow. But this will require parsing text (and this can introduce mistakes when text is edited but its parser not). Maybe in that casegum choose
could have extension to options format, likegum select --horizontal 0=Yes 1=No 4=Cancel
and if user selects "Cancel" it will print string "4" instead of "Cancel".The text was updated successfully, but these errors were encountered: