Feature: Allow checkbox in select
rubiin opened this issue · comments
Rubin Bhandari commented
So I am building a cli which allows user to select multiple items and run some operation on them. How can we achieve this ?
Chris Walz commented
I'm also interested in this
Andy Hume commented
I've put together a spike of this, to prove the basic concept.
Is there interest in adding this feature in principal? Or is this best left in our own fork?
package main
import (
"fmt"
"github.com/manifoldco/promptui"
)
func main() {
prompt := promptui.MultiSelect{
Label: "Select Day",
Items: []string{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday", "Sunday"},
}
_, result, err := prompt.Run()
if err != nil {
fmt.Printf("Prompt failed %v\n", err)
return
}
fmt.Printf("You chose %q\n", result)
}
Qiao commented
this is alternative
https://github.com/AlecAivazis/survey
Rubin Bhandari commented
this is alternative
https://github.com/AlecAivazis/survey
that looks way better for my project, thanks