complete

package
v0.28.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Complete

func Complete(shell Shell, args []string) string

Complete returns the completions output for the provided shell and arguments.

Types

type Bash added in v0.17.1

type Bash struct{}

func (Bash) Complete added in v0.17.1

func (b Bash) Complete(vals []core.KeyVal[string]) string

func (Bash) Name added in v0.17.1

func (b Bash) Name() string

func (Bash) Register added in v0.17.1

func (b Bash) Register() string

type Fish

type Fish struct{}

func (Fish) Complete

func (f Fish) Complete(vals []core.KeyVal[string]) string

func (Fish) Name

func (f Fish) Name() string

func (Fish) Register

func (f Fish) Register() string

type PowerShell added in v0.28.0

type PowerShell struct{}

PowerShell implements native completion registration for PowerShell. The completion protocol remains the same as the other shells: fetch receives the command words and returns one candidate per line, with an optional tab and description.

func (PowerShell) Complete added in v0.28.0

func (p PowerShell) Complete(vals []core.KeyVal[string]) string

func (PowerShell) Name added in v0.28.0

func (p PowerShell) Name() string

func (PowerShell) Register added in v0.28.0

func (p PowerShell) Register() string

type Shell

type Shell interface {
	Name() string
	Register() string
	Complete([]core.KeyVal[string]) string
}

Shell represents a supported shell for completions.

func GetShell

func GetShell(name string) Shell

GetShell returns the shell matching the provided name. If no shell matches, nil is returned.

type Zsh

type Zsh struct{}

func (Zsh) Complete

func (z Zsh) Complete(vals []core.KeyVal[string]) string

func (Zsh) Name

func (z Zsh) Name() string

func (Zsh) Register

func (z Zsh) Register() string

Jump to

Keyboard shortcuts

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