tmux

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tmux

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

Tmux implements runtime.Runtime using tmux sessions.

func New

func New(sessionName string) *Tmux

New creates a tmux-based Runtime with the given session name.

func (*Tmux) CaptureOutput

func (t *Tmux) CaptureOutput(ctx context.Context, proc *runtime.Process) (string, error)

CaptureOutput captures the visible pane output (last 80 lines).

func (*Tmux) Close

func (t *Tmux) Close() error

Close is a no-op for tmux — the session persists for reuse.

func (*Tmux) Kill

func (t *Tmux) Kill(ctx context.Context, proc *runtime.Process) error

Kill terminates the tmux window hosting the process.

func (*Tmux) Respawn

func (t *Tmux) Respawn(ctx context.Context, proc *runtime.Process, command string) error

Respawn kills the running process in the pane and starts a new command.

func (*Tmux) SendInput

func (t *Tmux) SendInput(ctx context.Context, proc *runtime.Process, keys ...string) error

SendInput sends keystrokes to the process pane.

func (*Tmux) StartProcess

func (t *Tmux) StartProcess(ctx context.Context, name, workDir, command string) (*runtime.Process, error)

StartProcess creates a new tmux window running the given command.

func (*Tmux) Watch

func (t *Tmux) Watch(ctx context.Context, proc *runtime.Process, handler runtime.OutputHandler) error

Watch streams process output via tmux pipe-pane through a FIFO. The handler receives a sliding window of the latest ~3200 characters each time new output arrives. Blocks until ctx is canceled.

Jump to

Keyboard shortcuts

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