completion

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(shell string) (string, error)

Generate produces a shell completion script for the specified shell type. Supported shells: bash, zsh, fish. Returns an error if the shell type is unsupported.

Types

type Data

type Data struct {
	ProgramName string
	Flags       []FlagInfo
}

Data contains the data needed to generate shell completion scripts.

type FlagInfo

type FlagInfo struct {
	Name        string   // Flag name without dashes
	Description string   // Human-readable description
	HasValue    bool     // true for string flags, false for bool flags
	ValueHint   string   // Hint for value type (e.g., "DIR", "PATH", "NAME")
	Values      []string // Enumerated values for completion (e.g., theme names)
}

FlagInfo contains metadata about a command-line flag for completion generation.

func GetFlags

func GetFlags() []FlagInfo

GetFlags returns metadata for all lazyworktree command-line flags. This is the single source of truth for shell completion generation.

Jump to

Keyboard shortcuts

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