picker

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package picker provides a simple interactive terminal picker.

Index

Constants

This section is empty.

Variables

View Source
var ErrCancelled = fmt.Errorf("selection cancelled")

ErrCancelled is returned when the user cancels the picker.

Functions

func Pick

func Pick(prompt string, items []string) (string, error)

Pick displays an interactive picker and returns the selected item. Returns ErrCancelled if the user presses Ctrl+C. Returns an error if stdin is not a terminal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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