dirsuggest

package
v0.3.49 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecentDirs

func RecentDirs(store *state.Store, limit int) []string

RecentDirs returns unique session working directories, most-recent first, capped at limit. It is derived from manifests only, with no filesystem scan.

Types

type DirQuerier

type DirQuerier interface {
	QueryDirs(fragment string) ([]string, error)
}

DirQuerier returns ranked directory suggestions for a typed fragment.

func NewZoxideDirQuerier

func NewZoxideDirQuerier() DirQuerier

NewZoxideDirQuerier returns the production zoxide-backed directory querier, or nil when zoxide is unavailable.

type DirQuerierFunc

type DirQuerierFunc func(fragment string) ([]string, error)

DirQuerierFunc adapts a function to DirQuerier.

func (DirQuerierFunc) QueryDirs

func (fn DirQuerierFunc) QueryDirs(fragment string) ([]string, error)

type Suggestions

type Suggestions struct {
	Suggestions []string `json:"suggestions"`
	Recents     []string `json:"recents"`
}

Suggestions is the directory data served to native clients.

func Query

func Query(store *state.Store, querier DirQuerier, query string, limit int) (Suggestions, error)

Query ranks zoxide candidates and recent session directories with the same fuzzy matcher used by the retired terminal picker.

Jump to

Keyboard shortcuts

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