fzf

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InteractiveChoice

func InteractiveChoice(command string) (string, error)

InteractiveChoice runs fzf with the given command and returns the selected item. It uses default options for fzf configuration.

func InteractiveChoiceWithOptions

func InteractiveChoiceWithOptions(command string, opts InteractiveChoiceOptions) (string, error)

InteractiveChoiceWithOptions runs fzf with the given command and options, returning the selected item.

func IsInteractiveMode

func IsInteractiveMode(stdout *os.File) bool

IsInteractiveMode determines if we can use fzf for interactive selection. It checks if: 1. TC_IGNORE_FZF environment variable is not set 2. stdout is a terminal 3. fzf is installed

Types

type InteractiveChoiceOptions

type InteractiveChoiceOptions struct {
	// FzfArgs are additional arguments to pass to the fzf command
	FzfArgs []string
	// EnablePreview determines if previews should be enabled
	EnablePreview bool
}

InteractiveChoiceOptions provides configuration for the interactive choice functionality.

func DefaultOptions

func DefaultOptions() InteractiveChoiceOptions

DefaultOptions returns the default options for interactive choice

Jump to

Keyboard shortcuts

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