fzf

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(lines []string, opts ...Option) (string, error)

Run launches fzf with the given lines and returns the selected line. Returns empty string and nil error if user cancelled (Esc/Ctrl-C).

func RunMulti added in v0.5.0

func RunMulti(lines []string, opts ...Option) ([]string, error)

RunMulti launches fzf with multi-select enabled (TAB to toggle, Ctrl-A to select all). Returns nil, nil on cancel (Esc/Ctrl-C).

Types

type ExpectResult added in v0.5.0

type ExpectResult struct {
	Query     string
	Key       string
	Selection string
}

func RunExpect added in v0.5.0

func RunExpect(lines []string, opts ...Option) (*ExpectResult, error)

RunExpect launches fzf with --print-query and --expect, returning structured output. Returns nil, nil on cancel (Esc/Ctrl-C).

type Option

type Option func(*config)

func WithAnsi

func WithAnsi() Option

func WithBind added in v0.5.0

func WithBind(bindings ...string) Option

func WithCycle added in v1.1.3

func WithCycle() Option

func WithDelimiter added in v1.1.12

func WithDelimiter(d string) Option

func WithExpectKeys added in v0.5.0

func WithExpectKeys(keys ...string) Option

func WithHeader

func WithHeader(h string) Option

func WithNoSort added in v0.5.0

func WithNoSort() Option

func WithNth added in v1.1.12

func WithNth(n string) Option

func WithPreview added in v0.5.0

func WithPreview(cmd, window string) Option

func WithPrintQuery added in v0.5.0

func WithPrintQuery() Option

func WithQuery added in v1.1.4

func WithQuery(q string) Option

func WithReverse

func WithReverse() Option

Jump to

Keyboard shortcuts

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