interactive

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: ISC Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyInput = errors.New("empty input")

Functions

This section is empty.

Types

type Config

type Config struct {
	Prompt         string
	AltPrompt      string
	HistoryFile    string
	ProcessFn      func(input string) error
	PasteThreshold time.Duration
}

Config defines the required parameters for creating a new interactive session.

type InteractiveSession

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

func NewInteractiveSession

func NewInteractiveSession(cfg Config) (*InteractiveSession, error)

func (*InteractiveSession) Run

func (s *InteractiveSession) Run() error

type MultilineState

type MultilineState int
const (
	MultilineNone MultilineState = iota
	MultilineActive
)

Jump to

Keyboard shortcuts

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