Documentation
¶
Index ¶
- Variables
- func ContextFromEnv(env Env) registry.TmuxContext
- func Current(ctx context.Context) (registry.TmuxContext, error)
- func CurrentWithEnv(ctx context.Context, env Env) (registry.TmuxContext, error)
- func ParseCurrent(output string) (registry.TmuxContext, error)
- func SendInterrupt(ctx context.Context, paneID string) error
- func SendInterruptTo(ctx context.Context, serverIdentity, paneID string) error
- type CaptureOptions
- type CommandRunner
- type Env
- type ListOptions
- type Pane
- type ScreenSnapshot
- type ServerProcess
- type ServerProcessLister
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoTmuxContext is returned when no tmux environment is available. ErrNoTmuxContext = errors.New("not inside tmux") // ErrInvalidFieldCount is returned when tmux output does not match the requested format. ErrInvalidFieldCount = errors.New("invalid tmux field count") )
Functions ¶
func ContextFromEnv ¶
func ContextFromEnv(env Env) registry.TmuxContext
func CurrentWithEnv ¶
func ParseCurrent ¶
func ParseCurrent(output string) (registry.TmuxContext, error)
Types ¶
type CaptureOptions ¶
type CaptureOptions struct {
Env Env
Run CommandRunner
Lines int
}
type CommandRunner ¶
CommandRunner executes tmux with an explicit argv. Implementations must not invoke a shell.
type ListOptions ¶
type ListOptions struct {
Env Env
Run CommandRunner
ServerProcesses ServerProcessLister
}
ListOptions controls pane discovery and is primarily useful for observer injection and deterministic tests.
type Pane ¶
type Pane struct {
Tmux registry.TmuxContext
ServerIdentity string
PanePID int
PaneTTY string
}
func ListPanesWithOptions ¶
func ListPanesWithOptions(ctx context.Context, options ListOptions) ([]Pane, error)
func ParseListPanes ¶
type ScreenSnapshot ¶
func CapturePane ¶
func CapturePane(ctx context.Context, pane Pane) (ScreenSnapshot, error)
func CapturePaneWithOptions ¶
func CapturePaneWithOptions(ctx context.Context, pane Pane, options CaptureOptions) (ScreenSnapshot, error)
type ServerProcess ¶
ServerProcess is the current-user process snapshot used to discover custom tmux servers.
type ServerProcessLister ¶
type ServerProcessLister func(context.Context) ([]ServerProcess, error)
ServerProcessLister supplies current-user tmux server processes.
Click to show internal directories.
Click to hide internal directories.