picker

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package picker provides interactive terminal prompts (selection, yes/no confirmation) shared by wt commands that fall back to a picker when the user doesn't name a worktree explicitly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(title string) (bool, error)

Confirm asks a yes/no question and returns the answer, defaulting to "No".

func SelectWorktree

func SelectWorktree(action string, entries []git.Worktree, mainDir string) (git.Worktree, error)

SelectWorktree prompts the user to choose one of entries, showing each one's branch as the label — with a "(main)" marker for the entry whose path is mainDir, so callers that include the main checkout among entries can still tell it apart. Returns an error if entries is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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