https://kotlinlang.org logo
#clikt
Title
# clikt
a

AJ Alt

03/18/2024, 4:48 PM
You can use mordant to render and animate it, but you'll need something like JLine to handle the inputs.
p

Paul Woitaschek

03/19/2024, 5:27 AM
Is it out of the scope or clickt to ever support it? I'd also love to have it!
a

AJ Alt

03/19/2024, 4:18 PM
People keep asking for it, so maybe. But implementing raw mode input handling for every target mordant supports is potentially a lot of work, so no promises. Can you give me an example of what you would want that support to look like?
t

ted

03/19/2024, 6:05 PM
In the golang framework, we just pass the choices with a display text and value.
Copy code
huh.NewSelect[string]().
    Title("Pick a country.").
    Options(
        huh.NewOption("United States", "US"),
        huh.NewOption("Germany", "DE"),
        huh.NewOption("Brazil", "BR"),
        huh.NewOption("Canada", "CA"),
    ).
    Value(&country)
Also supports multi select
Copy code
huh.NewMultiSelect[string]().
..
p

Paul Woitaschek

03/19/2024, 8:14 PM
For us it’s always multiple choice
Here it would be great to have an up-down to select values instead of needing to press certain keys
3 Views