pane

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameDirect  = "direct"
	NameWezTerm = "wezterm"
	NameTmux    = "tmux"
	NameAuto    = "auto"
)

Spawner name constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectSpawner

type DirectSpawner struct{}

DirectSpawner runs commands directly in the current terminal as a fallback.

func (*DirectSpawner) Available

func (d *DirectSpawner) Available() bool

func (*DirectSpawner) Name

func (d *DirectSpawner) Name() string

func (*DirectSpawner) SpawnAndWait

func (d *DirectSpawner) SpawnAndWait(ctx context.Context, cmd string, args []string) error

type PaneSpawner

type PaneSpawner interface {
	// SpawnAndWait spawns a command in a new pane and waits for completion.
	SpawnAndWait(ctx context.Context, cmd string, args []string) error
	// Available returns whether this spawner can be used in the current environment.
	Available() bool
	// Name returns the multiplexer name.
	Name() string
}

PaneSpawner abstracts terminal multiplexer pane operations.

func AutoDetect

func AutoDetect() PaneSpawner

AutoDetect returns the best available PaneSpawner for the current environment.

func ByName

func ByName(name string) PaneSpawner

ByName returns a PaneSpawner by name, falling back to AutoDetect if not found.

type WezTermSpawner

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

WezTermSpawner spawns commands in a new WezTerm pane.

func (*WezTermSpawner) Available

func (w *WezTermSpawner) Available() bool

func (*WezTermSpawner) Name

func (w *WezTermSpawner) Name() string

func (*WezTermSpawner) SpawnAndWait

func (w *WezTermSpawner) SpawnAndWait(ctx context.Context, cmd string, args []string) error

Jump to

Keyboard shortcuts

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