gum/choose/options.go
Maas Lalani 46ddc28ae5
feat: gum choose, pick from a list of choices
gum choose allows the user to be prompted for a choice from a list of choices.

For example, let's ask the user to pick a card from a deck.
gum choose --height 15 {Ace,King,Queen,Jack,Ten,Nine,Eight,Seven,Six,Five,Four,Three,Two}" of "{Spades,Hearts,Clubs,Diamonds}
2022-07-11 16:26:23 -04:00

14 lines
614 B
Go

package choose
// Options is the customization options for the choose command.
type Options struct {
Options []string `arg:"" optional:"" help:"Options to choose from."`
Height int `help:"Height of the list." default:"10"`
HidePagination bool `help:"Hide pagination." default:"false"`
Indicator string `help:"Prefix to show on selected item" default:"> "`
IndicatorColor string `help:"Indicator foreground color" default:"212"`
SelectedColor string `help:"Selected item foreground color" default:"212"`
UnselectedColor string `help:"Unselected item foreground color" default:""`
}