picker

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the bubbletea picker model.

func New

func New(enabled map[string]string) Model

New returns a fresh picker starting at language selection. If enabled is non-nil, only languages whose name appears in the map are shown.

func (Model) Chosen

func (m Model) Chosen() *Option

Chosen returns the selected option, or nil if cancelled.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Language

func (m Model) Language() string

Language returns the name of the selected language.

func (Model) Update

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

func (Model) View

func (m Model) View() string

type Option

type Option struct {
	Label        string
	BuildCommand string
	RunCommand   string
	Description  string
}

Option represents a predefined build/run command pair.

Jump to

Keyboard shortcuts

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