Documentation
¶
Index ¶
- func Confirm(question string, defaultYes bool) (bool, error)
- func MultiSelect(question string, options []string, defaultSelected func(string) bool) ([]string, error)
- func PromptConfirm(question string) (bool, error)
- func PromptFilePicker(prompt string, directory string) ([]string, error)
- func PromptInput(question string, defaultValue string) (string, error)
- func PromptMultiSelect(question string, options []string) ([]int, error)
- func PromptSelect(question string, options []string) (int, error)
- func ShouldPrompt(cmd *cobra.Command, hasRequiredInfo bool) bool
- type Mode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Confirm ¶ added in v0.0.28
Confirm is a convenience wrapper around PromptConfirm with default value support
func MultiSelect ¶ added in v0.0.28
func MultiSelect(question string, options []string, defaultSelected func(string) bool) ([]string, error)
MultiSelect is a convenience wrapper around PromptMultiSelect that returns selected values
func PromptConfirm ¶
PromptConfirm prompts the user for yes/no confirmation
func PromptFilePicker ¶
PromptFilePicker prompts the user with a file picker for multi-file selection Returns a slice of absolute file paths that were selected. Users must explicitly select files with Space key; Enter with no selection cancels.
func PromptInput ¶
PromptInput prompts the user for text input
func PromptMultiSelect ¶
PromptMultiSelect prompts the user to select multiple items from a list
func PromptSelect ¶
PromptSelect prompts the user to select one item from a list
Types ¶
Click to show internal directories.
Click to hide internal directories.