prompt

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package prompt provides interactive prompt functionality using Bubble Tea.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TextPrompt

type TextPrompt struct {
	Value   string
	Default interface{}
	// contains filtered or unexported fields
}

TextPrompt is a simple text input prompt

func NewTextPrompt

func NewTextPrompt(prompt string, defaultValue interface{}) TextPrompt

NewTextPrompt creates a new text prompt with the given prompt text and optional default value

func (TextPrompt) Init

func (m TextPrompt) Init() tea.Cmd

Init initializes the prompt (returns no command)

func (TextPrompt) Update

func (m TextPrompt) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles user input and returns the updated model

func (TextPrompt) View

func (m TextPrompt) View() string

View renders the prompt as a string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL