Documentation
¶
Index ¶
- Variables
- func ConfirmMenu(title string, defaultYes bool) (bool, error)
- func GetFormattedInputStdin() (formattedInput string)
- func InitialModel(preprompt *string, programLoop *bool, lastResponse *string, ...) model
- func PromptInput(prompt string, history []string) (string, bool, error)
- func RestoreTerminal()
- func SelectMenu(title string, options []string, defaultIndex int) (int, string, error)
- type InputModel
- type SelectModel
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInterrupted = errors.New("interrupted") ErrCanceled = errors.New("selection canceled") )
Functions ¶
func ConfirmMenu ¶ added in v2.13.0
ConfirmMenu displays an interactive Yes/No selector. Returns true if "Yes" was selected, false if "No" or canceled.
func GetFormattedInputStdin ¶
func GetFormattedInputStdin() (formattedInput string)
func InitialModel ¶
func PromptInput ¶ added in v2.13.0
PromptInput runs a single-line input prompt using Bubble Tea. Returns input string, canceled bool (true if Ctrl+C was pressed), and error.
func RestoreTerminal ¶ added in v2.13.0
func RestoreTerminal()
Types ¶
type InputModel ¶ added in v2.13.0
func InitialInputModel ¶ added in v2.13.0
func InitialInputModel(prompt string, history []string) InputModel
func (InputModel) Init ¶ added in v2.13.0
func (m InputModel) Init() tea.Cmd
func (InputModel) View ¶ added in v2.13.0
func (m InputModel) View() tea.View
type SelectModel ¶ added in v2.13.0
type SelectModel struct {
Title string
Options []string
Cursor int
Selected int
Canceled bool
Interrupted bool
}
func (SelectModel) Init ¶ added in v2.13.0
func (m SelectModel) Init() tea.Cmd
func (SelectModel) View ¶ added in v2.13.0
func (m SelectModel) View() tea.View
Click to show internal directories.
Click to hide internal directories.