detect

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CY_HOOK     = "cy"
	TEST_PROMPT = "\033Pcy\033\\$ "
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// The human-readable representation of this command as it appeared
	// originally.
	Text string
	// In certain circumstances, input is not contiguous
	Input []search.Selection
	// But output always is
	Output search.Selection
	// Whether this command is still in progress. If true, `Output` will
	// not be valid.
	Pending bool

	// The indices of the event where each of these stages occurred.
	// The event at which the user was prompted
	Prompted int
	// The event at which the command was executed (it was finished being
	// input)
	Executed int
	// The event at which the command finished executing (its output ended)
	Completed int
	// contains filtered or unexported fields
}

func (Command) InputStart

func (c Command) InputStart() geom.Vec2

type Detector

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

func New

func New() *Detector

func (*Detector) Commands

func (d *Detector) Commands(
	term emu.Terminal,
	events []sessions.Event,
) []Command

func (*Detector) Detect

func (d *Detector) Detect(
	term emu.Terminal,
	events []sessions.Event,
)

Jump to

Keyboard shortcuts

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