tabcomplete

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package tabcomplete provides filesystem path completion and tab-cycling helpers for TUI input fields.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FSCompletions

func FSCompletions(prefix string) []string

FSCompletions returns filesystem path completions for prefix. Returns nil if prefix is empty or no matches are found.

Types

type TabState

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

TabState tracks cycling state for tab completion.

func (*TabState) Advance

func (ts *TabState) Advance(prefix string, complete func(string) []string) (string, bool)

Advance cycles completions for prefix using the complete function. On first call (no existing completions), it builds candidates from complete(prefix). On subsequent calls, it cycles to the next candidate. Returns the selected completion and true, or ("", false) if no matches.

func (*TabState) Reset

func (ts *TabState) Reset()

Reset clears all completion state.

Jump to

Keyboard shortcuts

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