frontend

package
v0.0.0-...-8fec888 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OptionFzfKey = "fzf-key"
	FzfKeyCTRL_T = "ctrl-t"
	FzfKeyCTRL_A = "ctrl-a"
	FzfKeyCTRL_P = "ctrl-p"
	FzfKeyCTRL_N = "ctrl-n"
	FzfKeyCTRL_D = "ctrl-d"
	FzfKeyCTRL_V = "ctrl-v"
)

Variables

View Source
var (
	ErrNoFrontendConfigured = errors.New("no frontend was configured")
	ErrNoEntrySelected      = errors.New("no entry selected")
	ErrNoNewLine            = errors.New("no newline found at the end of entry")
	ErrBadSelection         = errors.New("bad selection")
)

Functions

func GetCtrlKeysOptions

func GetCtrlKeysOptions() []string

Types

type Frontend

type Frontend interface {
	// StartFromReader starts the frontend and read entries from the reader
	StartFromReader(io.Reader, *config.Config) error

	// GetSelection waits for the input and return the selection
	GetSelection() (string, map[string]string, error)

	// AllowLocalExecution returns true if the frontend allows some entry to be
	// launched without a remote.
	AllowLocalExecution() bool
}

type FzfFrontend

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

func NewFzfFrontend

func NewFzfFrontend() *FzfFrontend

func (*FzfFrontend) AllowLocalExecution

func (f *FzfFrontend) AllowLocalExecution() bool

func (*FzfFrontend) GetSelection

func (f *FzfFrontend) GetSelection() (string, map[string]string, error)

func (*FzfFrontend) StartFromReader

func (f *FzfFrontend) StartFromReader(reader io.Reader, conf *config.Config) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳