Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

2816 symbols, extracted from source. Every type name in a signature links to its own entry; every cross-reference in a doc comment resolves against the same table.

Server 2 types, 2 functions and constants
ServerOptionValues 28 members

ServerOptionValues is an immutable materialized view of known server option values; its zero value is empty and it does not refresh. Obtain it with Server.Options . OptionValue.Get reports presence and OptionValue.Origin reports inheritance. Use Server.RawOption for caller-named or undecoded values.

Server 109 members

Server is an immutable handle to one tmux configuration. Its zero value is invalid. Copying a configured Server preserves its configuration and shares version-cache coordination; only the documented concurrent operations are safe to share.

NewServer ( options : ServerOptions ) → (Server, error)
function [source]
function [source]
NewServer

NewServer validates and snapshots one tmux configuration without starting tmux. Empty socket selectors use the endpoint selected by the frozen environment.

Discussed in Socket and servers

NewServerFromEnv ( environment : map[string]string ) → (Server, error)
function [source]
function [source]
NewServerFromEnv

NewServerFromEnv returns a server configured from TMUX without starting tmux. It snapshots the process environment once. A nonnil environment supplies discovery values and overrides that snapshot for later tmux processes; an empty map therefore has no TMUX discovery value. Names follow the platform's environment rules and are case-insensitive on Windows.

Discussed in Environment

Session 4 types, 2 functions and constants
SessionID 1 members

SessionID is tmux's stable session identifier, including its $ sigil. The zero value is not a usable tmux target.

Session 132 members

Session is one materialized tmux session record. It is normally returned by Server.Snapshot , Server.Session , or Session.Refresh . A zero Session is not a usable tmux target.

SessionOptionValues 54 members

SessionOptionValues is an immutable materialized view of known session option values; its zero value is empty and it does not refresh. Obtain it with Session.Options or GlobalSessionScope.Options . OptionValue.Get reports presence and OptionValue.Origin reports inheritance. Use Session.RawOption or GlobalSessionScope.RawOption for caller-named or undecoded values.

GlobalSessionScope 66 members

GlobalSessionScope is an immutable handle for global session options and hooks. Its zero value is invalid because it contains a zero Server .

SessionFromEnv ( ctx : context.Context , environment : map[string]string ) → (Session, error)
function [source]
function [source]
SessionFromEnv

SessionFromEnv returns the canonical session containing the environment's pane. Nil reads the process environment; a nonnil empty map does not.

Discussed in Environment

ValidateSessionName ( name : string ) → error
function [source]
function [source]
ValidateSessionName

ValidateSessionName reports whether name can be used as a tmux session name. Empty names, the target delimiters '.' and ':', control characters and invalid UTF-8 are rejected.

Window 9 types, 16 functions and constants
WindowID 1 members

WindowID is tmux's stable window identifier, including its @ sigil. It does not distinguish linked-session views; the zero value is not a usable target.

Window 158 members

Window is one materialized (session, index, window) winlink record. It is normally returned by Server.Snapshot , Server.Window , or Window.Refresh . A zero Window is not a usable tmux target.

WindowSize 2 members

WindowSize is a typed value for the "window-size" tmux option. Its zero value is invalid.

WindowOptionValues 74 members

WindowOptionValues is an immutable materialized view of known window option values; its zero value is empty and it does not refresh. Obtain it with Window.Options or GlobalWindowScope.Options . OptionValue.Get reports presence and OptionValue.Origin reports inheritance. Use Window.RawOption or GlobalWindowScope.RawOption for caller-named or undecoded values.

GlobalWindowScope 86 members

GlobalWindowScope is an immutable handle for global window options and hooks. Its zero value is invalid because it contains a zero Server .

NewWindowDirection 0 members

NewWindowDirection selects placement relative to the target winlink on tmux 3.2a or later. Its zero value lets Session.NewWindow with nil Index use the next free index, while Window.NewWindow keeps the receiver's exact occupied target.

RotateWindowDirection 0 members

RotateWindowDirection selects rotate-window's direction on tmux 3.2a or later. Its zero value uses tmux's default rotation.

WindowResizeDirection 0 members

WindowResizeDirection selects one directional resize operation on tmux 3.2a or later. Its zero value selects no directional adjustment.

Window 13 members

Window is one window in a workspace.

NewWindowDirectionAfter : NewWindowDirection
constant [source]
constant [source]
NewWindowDirectionAfter

NewWindowDirectionAfter places the new winlink after the target.

NewWindowDirectionBefore : NewWindowDirection
constant [source]
constant [source]
NewWindowDirectionBefore

NewWindowDirectionBefore places the new winlink before the target.

NewWindowDirectionDefault : NewWindowDirection
constant [source]
constant [source]
NewWindowDirectionDefault

NewWindowDirectionDefault uses the next free index with Session.NewWindow when Index is nil; Window.NewWindow instead keeps the receiver's exact occupied target.

RotateWindowDefault : RotateWindowDirection
constant [source]
constant [source]
RotateWindowDefault

RotateWindowDefault uses tmux's default rotation.

RotateWindowDown : RotateWindowDirection
constant [source]
constant [source]
RotateWindowDown

RotateWindowDown rotates pane positions toward higher indexes.

RotateWindowUp : RotateWindowDirection
constant [source]
constant [source]
RotateWindowUp

RotateWindowUp rotates pane positions toward lower indexes.

WindowResizeDirectionDown : WindowResizeDirection
constant [source]
constant [source]
WindowResizeDirectionDown

WindowResizeDirectionDown adjusts the window downward.

WindowResizeDirectionLeft : WindowResizeDirection
constant [source]
constant [source]
WindowResizeDirectionLeft

WindowResizeDirectionLeft adjusts the window leftward.

WindowResizeDirectionNone : WindowResizeDirection
constant [source]
constant [source]
WindowResizeDirectionNone

WindowResizeDirectionNone selects no directional adjustment.

WindowResizeDirectionRight : WindowResizeDirection
constant [source]
constant [source]
WindowResizeDirectionRight

WindowResizeDirectionRight adjusts the window rightward.

WindowResizeDirectionUp : WindowResizeDirection
constant [source]
constant [source]
WindowResizeDirectionUp

WindowResizeDirectionUp adjusts the window upward.

WindowSizeLargest : WindowSize
constant [source]
constant [source]
WindowSizeLargest

WindowSizeLargest selects "largest".

WindowSizeLatest : WindowSize
constant [source]
constant [source]
WindowSizeLatest

WindowSizeLatest selects "latest".

WindowSizeManual : WindowSize
constant [source]
constant [source]
WindowSizeManual

WindowSizeManual selects "manual".

WindowSizeSmallest : WindowSize
constant [source]
constant [source]
WindowSizeSmallest

WindowSizeSmallest selects "smallest".

WindowFromEnv ( ctx : context.Context , environment : map[string]string ) → (Window, error)
function [source]
function [source]
WindowFromEnv

WindowFromEnv returns the window containing the pane identified by the environment. Nil reads the process environment; a nonnil empty map does not.

Discussed in Environment

Pane 15 types, 39 functions and constants
PaneDirection 0 members

PaneDirection selects where a tiled pane is created or moved on tmux 3.2a or later. Its zero value places the pane below the target.

PaneID 1 members

PaneID is tmux's stable pane identifier, including its % sigil. It does not distinguish linked-session views; the zero value is not a usable target.

Pane 175 members

Pane is one materialized pane record within a specific winlink. It is normally returned by Server.Snapshot , Server.Pane , or Pane.Refresh . A zero Pane is not a usable tmux target.

PaneBorderIndicators 2 members

PaneBorderIndicators is a typed value for the "pane-border-indicators" tmux option. Its zero value is invalid.

PaneBorderLines 2 members

PaneBorderLines is a typed value for the "pane-border-lines" tmux option. Its zero value is invalid.

PaneBorderStatus 2 members

PaneBorderStatus is a typed value for the "pane-border-status" tmux option. Its zero value is invalid.

PaneScrollbars 2 members

PaneScrollbars is a typed value for the "pane-scrollbars" tmux option. Its zero value is invalid.

PaneScrollbarsPosition 2 members

PaneScrollbarsPosition is a typed value for the "pane-scrollbars-position" tmux option. Its zero value is invalid.

PaneOptionValues 19 members

PaneOptionValues is an immutable materialized view of known pane option values; its zero value is empty and it does not refresh. Obtain it with Pane.Options . OptionValue.Get reports presence and OptionValue.Origin reports inheritance. Use Pane.RawOption for caller-named or undecoded values.

PaneResizeDirection 0 members

PaneResizeDirection selects a directional Pane.Resize . Its zero value selects no directional adjustment.

PaneSize 0 members

PaneSize is an opaque absolute cell count or percentage for Pane.Resize . Its zero value omits the dimension. [PaneCells](0) and [PanePercent](0) are explicit sizes, not zero PaneSize values.

PaneText 3 members

PaneText is what a pane wrote after an observation's baseline, as the text a person would read: escape sequences removed, UTF-8 joined across writes, and each carriage return or backspace that would overwrite text starting a new line, so nothing the program wrote is hidden.

SwapPaneDirection 0 members

SwapPaneDirection selects an adjacent pane for swap-pane on tmux 3.2a or later. Its zero value selects no adjacent pane.

PaneSelectDirection 0 members

PaneSelectDirection selects a pane relative to the command target on tmux 3.2a or later. Its zero value selects no relative direction.

Pane 11 members

Pane is one pane in a window. YAML accepts either a bare command string or a mapping, so "echo hello" and {shell_command: echo hello} are equivalent.

PaneBorderIndicatorsArrows : PaneBorderIndicators
constant [source]
constant [source]
PaneBorderIndicatorsArrows

PaneBorderIndicatorsArrows selects "arrows".

PaneBorderIndicatorsBoth : PaneBorderIndicators
constant [source]
constant [source]
PaneBorderIndicatorsBoth

PaneBorderIndicatorsBoth selects "both".

PaneBorderIndicatorsColour : PaneBorderIndicators
constant [source]
constant [source]
PaneBorderIndicatorsColour

PaneBorderIndicatorsColour selects "colour".

PaneBorderIndicatorsOff : PaneBorderIndicators
constant [source]
constant [source]
PaneBorderIndicatorsOff

PaneBorderIndicatorsOff selects "off".

PaneBorderLinesDouble : PaneBorderLines
constant [source]
constant [source]
PaneBorderLinesDouble

PaneBorderLinesDouble selects "double".

PaneBorderLinesHeavy : PaneBorderLines
constant [source]
constant [source]
PaneBorderLinesHeavy

PaneBorderLinesHeavy selects "heavy".

PaneBorderLinesNumber : PaneBorderLines
constant [source]
constant [source]
PaneBorderLinesNumber

PaneBorderLinesNumber selects "number".

PaneBorderLinesSimple : PaneBorderLines
constant [source]
constant [source]
PaneBorderLinesSimple

PaneBorderLinesSimple selects "simple".

PaneBorderLinesSingle : PaneBorderLines
constant [source]
constant [source]
PaneBorderLinesSingle

PaneBorderLinesSingle selects "single".

PaneBorderLinesSpaces : PaneBorderLines
constant [source]
constant [source]
PaneBorderLinesSpaces

PaneBorderLinesSpaces selects "spaces".

PaneBorderStatusBottom : PaneBorderStatus
constant [source]
constant [source]
PaneBorderStatusBottom

PaneBorderStatusBottom selects "bottom".

PaneBorderStatusOff : PaneBorderStatus
constant [source]
constant [source]
PaneBorderStatusOff

PaneBorderStatusOff selects "off".

PaneBorderStatusTop : PaneBorderStatus
constant [source]
constant [source]
PaneBorderStatusTop

PaneBorderStatusTop selects "top".

PaneDirectionAbove : PaneDirection
constant [source]
constant [source]
PaneDirectionAbove

PaneDirectionAbove places the pane above the target.

PaneDirectionBelow : PaneDirection
constant [source]
constant [source]
PaneDirectionBelow

PaneDirectionBelow places the pane below the target.

PaneDirectionLeft : PaneDirection
constant [source]
constant [source]
PaneDirectionLeft

PaneDirectionLeft places the pane to the left of the target.

PaneDirectionRight : PaneDirection
constant [source]
constant [source]
PaneDirectionRight

PaneDirectionRight places the pane to the right of the target.

PaneResizeDirectionDown : PaneResizeDirection
constant [source]
constant [source]
PaneResizeDirectionDown

PaneResizeDirectionDown selects tmux's downward adjustment.

PaneResizeDirectionLeft : PaneResizeDirection
constant [source]
constant [source]
PaneResizeDirectionLeft

PaneResizeDirectionLeft selects tmux's leftward adjustment.

PaneResizeDirectionNone : PaneResizeDirection
constant [source]
constant [source]
PaneResizeDirectionNone

PaneResizeDirectionNone omits a directional resize.

PaneResizeDirectionRight : PaneResizeDirection
constant [source]
constant [source]
PaneResizeDirectionRight

PaneResizeDirectionRight selects tmux's rightward adjustment.

PaneResizeDirectionUp : PaneResizeDirection
constant [source]
constant [source]
PaneResizeDirectionUp

PaneResizeDirectionUp selects tmux's upward adjustment.

PaneScrollbarsModal : PaneScrollbars
constant [source]
constant [source]
PaneScrollbarsModal

PaneScrollbarsModal selects "modal".

PaneScrollbarsOff : PaneScrollbars
constant [source]
constant [source]
PaneScrollbarsOff

PaneScrollbarsOff selects "off".

PaneScrollbarsOn : PaneScrollbars
constant [source]
constant [source]
PaneScrollbarsOn

PaneScrollbarsOn selects "on".

PaneScrollbarsPositionLeft : PaneScrollbarsPosition
constant [source]
constant [source]
PaneScrollbarsPositionLeft

PaneScrollbarsPositionLeft selects "left".

PaneScrollbarsPositionRight : PaneScrollbarsPosition
constant [source]
constant [source]
PaneScrollbarsPositionRight

PaneScrollbarsPositionRight selects "right".

PaneSelectDirectionDown : PaneSelectDirection
constant [source]
constant [source]
PaneSelectDirectionDown

PaneSelectDirectionDown selects the pane below the target.

PaneSelectDirectionLast : PaneSelectDirection
constant [source]
constant [source]
PaneSelectDirectionLast

PaneSelectDirectionLast selects the previously active pane.

PaneSelectDirectionLeft : PaneSelectDirection
constant [source]
constant [source]
PaneSelectDirectionLeft

PaneSelectDirectionLeft selects the pane to the left of the target.

PaneSelectDirectionNone : PaneSelectDirection
constant [source]
constant [source]
PaneSelectDirectionNone

PaneSelectDirectionNone selects no relative pane.

PaneSelectDirectionRight : PaneSelectDirection
constant [source]
constant [source]
PaneSelectDirectionRight

PaneSelectDirectionRight selects the pane to the right of the target.

PaneSelectDirectionUp : PaneSelectDirection
constant [source]
constant [source]
PaneSelectDirectionUp

PaneSelectDirectionUp selects the pane above the target.

SwapPaneDirectionDown : SwapPaneDirection
constant [source]
constant [source]
SwapPaneDirectionDown

SwapPaneDirectionDown swaps with the next pane in index order.

SwapPaneDirectionNone : SwapPaneDirection
constant [source]
constant [source]
SwapPaneDirectionNone

SwapPaneDirectionNone selects no adjacent pane.

SwapPaneDirectionUp : SwapPaneDirection
constant [source]
constant [source]
SwapPaneDirectionUp

SwapPaneDirectionUp swaps with the previous pane in index order.

PaneCells ( cells : int ) → PaneSize
function [source]
function [source]
PaneCells

PaneCells returns an explicit pane size measured in cells. Resize validates that cells is nonnegative; zero remains an explicit request.

PaneFromEnv ( ctx : context.Context , environment : map[string]string ) → (Pane, error)
function [source]
function [source]
PaneFromEnv

PaneFromEnv returns the pane identified by TMUX and TMUX_PANE. Nil reads the process environment; a nonnil empty map does not. Environment names are case-insensitive on Windows. It resolves the live hierarchy later through identity-checked tmux queries.

Discussed in Environment

PanePercent ( percent : int ) → PaneSize
function [source]
function [source]
PanePercent

PanePercent returns an explicit percentage of the window size. Resize validates that percent is between 0 and 100 inclusive; zero remains an explicit request.

Client 3 types
ClientAttachment 3 members

ClientAttachment is one immutable view of a client's live attachment. Session, Window, and Pane return values from the same observational Snapshot.

ClientName 1 members

ClientName is tmux's stable client name, normally its terminal path. The zero value is not a usable tmux target.

Client 35 members

Client is one materialized tmux client record. It is normally returned by Server.Snapshot , Server.Client , or Client.Refresh . A zero Client is not a usable tmux target.

Hooks 4 types
ServerHookValues 57 members

ServerHookValues is an immutable materialized view of known global session-scope hook values; its zero value is empty and it does not refresh. Obtain it with GlobalSessionScope.Hooks . OptionValue.Get reports presence and OptionValue.Origin reports inheritance. Use GlobalSessionScope.RawHook for caller-named or undecoded values.

SessionHookValues 57 members

SessionHookValues is an immutable materialized view of known session hook values; its zero value is empty and it does not refresh. Obtain it with Session.Hooks . OptionValue.Get reports presence and OptionValue.Origin reports inheritance. Use Session.RawHook for caller-named or undecoded values.

WindowHookValues 13 members

WindowHookValues is an immutable materialized view of known window hook values; its zero value is empty and it does not refresh. Obtain it with Window.Hooks or GlobalWindowScope.Hooks . OptionValue.Get reports presence and OptionValue.Origin reports inheritance. Use Window.RawHook or GlobalWindowScope.RawHook for caller-named or undecoded values.

PaneHookValues 7 members

PaneHookValues is an immutable materialized view of known pane hook values; its zero value is empty and it does not refresh. Obtain it with Pane.Hooks . OptionValue.Get reports presence and OptionValue.Origin reports inheritance. Use Pane.RawHook for caller-named or undecoded values.

Options 21 types, 77 functions and constants
AllowPassthrough 2 members

AllowPassthrough is a typed value for the "allow-passthrough" tmux option. Its zero value is invalid.

CopyModeLineNumbers 2 members

CopyModeLineNumbers is a typed value for the "copy-mode-line-numbers" tmux option. Its zero value is invalid.

DestroyUnattached 2 members

DestroyUnattached is a typed value for the "destroy-unattached" tmux option. Its zero value is invalid.

DetachOnDestroy 2 members

DetachOnDestroy is a typed value for the "detach-on-destroy" tmux option. Its zero value is invalid.

ExtendedKeys 2 members

ExtendedKeys is a typed value for the "extended-keys" tmux option. Its zero value is invalid.

GetClipboard 2 members

GetClipboard is a typed value for the "get-clipboard" tmux option. Its zero value is invalid.

MenuBorderLines 2 members

MenuBorderLines is a typed value for the "menu-border-lines" tmux option. Its zero value is invalid.

MessageLine 2 members

MessageLine is a typed value for the "message-line" tmux option. Its zero value is invalid.

ModeKeys 2 members

ModeKeys is a typed value for the "mode-keys" tmux option. Its zero value is invalid.

PopupBorderLines 2 members

PopupBorderLines is a typed value for the "popup-border-lines" tmux option. Its zero value is invalid.

RemainOnExit 2 members

RemainOnExit is a typed value for the "remain-on-exit" tmux option. Its zero value is invalid.

SetClipboard 2 members

SetClipboard is a typed value for the "set-clipboard" tmux option. Its zero value is invalid.

Status 2 members

Status is a typed value for the "status" tmux option. Its zero value is invalid.

StatusJustify 2 members

StatusJustify is a typed value for the "status-justify" tmux option. Its zero value is invalid.

StatusKeys 2 members

StatusKeys is a typed value for the "status-keys" tmux option. Its zero value is invalid.

StatusPosition 2 members

StatusPosition is a typed value for the "status-position" tmux option. Its zero value is invalid.

VisualActivity 2 members

VisualActivity is a typed value for the "visual-activity" tmux option. Its zero value is invalid.

VisualBell 2 members

VisualBell is a typed value for the "visual-bell" tmux option. Its zero value is invalid.

VisualSilence 2 members

VisualSilence is a typed value for the "visual-silence" tmux option. Its zero value is invalid.

OptionOrigin 1 members

OptionOrigin identifies where a present option value was resolved. The declared values form the complete set of valid origins.

OptionValue 2 members

OptionValue preserves option presence and resolution origin. Its zero value is absent. Copies of reference-bearing T values are shallow.

AllowPassthroughAll : AllowPassthrough
constant [source]
constant [source]
AllowPassthroughAll

AllowPassthroughAll selects "all".

AllowPassthroughOff : AllowPassthrough
constant [source]
constant [source]
AllowPassthroughOff

AllowPassthroughOff selects "off".

AllowPassthroughOn : AllowPassthrough
constant [source]
constant [source]
AllowPassthroughOn

AllowPassthroughOn selects "on".

CopyModeLineNumbersAbsolute : CopyModeLineNumbers
constant [source]
constant [source]
CopyModeLineNumbersAbsolute

CopyModeLineNumbersAbsolute selects "absolute".

CopyModeLineNumbersDefault : CopyModeLineNumbers
constant [source]
constant [source]
CopyModeLineNumbersDefault

CopyModeLineNumbersDefault selects "default".

CopyModeLineNumbersHybrid : CopyModeLineNumbers
constant [source]
constant [source]
CopyModeLineNumbersHybrid

CopyModeLineNumbersHybrid selects "hybrid".

CopyModeLineNumbersOff : CopyModeLineNumbers
constant [source]
constant [source]
CopyModeLineNumbersOff

CopyModeLineNumbersOff selects "off".

CopyModeLineNumbersRelative : CopyModeLineNumbers
constant [source]
constant [source]
CopyModeLineNumbersRelative

CopyModeLineNumbersRelative selects "relative".

DestroyUnattachedKeepGroup : DestroyUnattached
constant [source]
constant [source]
DestroyUnattachedKeepGroup

DestroyUnattachedKeepGroup selects "keep-group".

DestroyUnattachedKeepLast : DestroyUnattached
constant [source]
constant [source]
DestroyUnattachedKeepLast

DestroyUnattachedKeepLast selects "keep-last".

DestroyUnattachedOff : DestroyUnattached
constant [source]
constant [source]
DestroyUnattachedOff

DestroyUnattachedOff selects "off".

DestroyUnattachedOn : DestroyUnattached
constant [source]
constant [source]
DestroyUnattachedOn

DestroyUnattachedOn selects "on".

DetachOnDestroyNext : DetachOnDestroy
constant [source]
constant [source]
DetachOnDestroyNext

DetachOnDestroyNext selects "next".

DetachOnDestroyNoDetached : DetachOnDestroy
constant [source]
constant [source]
DetachOnDestroyNoDetached

DetachOnDestroyNoDetached selects "no-detached".

DetachOnDestroyOff : DetachOnDestroy
constant [source]
constant [source]
DetachOnDestroyOff

DetachOnDestroyOff selects "off".

DetachOnDestroyOn : DetachOnDestroy
constant [source]
constant [source]
DetachOnDestroyOn

DetachOnDestroyOn selects "on".

DetachOnDestroyPrevious : DetachOnDestroy
constant [source]
constant [source]
DetachOnDestroyPrevious

DetachOnDestroyPrevious selects "previous".

ExtendedKeysAlways : ExtendedKeys
constant [source]
constant [source]
ExtendedKeysAlways

ExtendedKeysAlways selects "always".

ExtendedKeysOff : ExtendedKeys
constant [source]
constant [source]
ExtendedKeysOff

ExtendedKeysOff selects "off".

ExtendedKeysOn : ExtendedKeys
constant [source]
constant [source]
ExtendedKeysOn

ExtendedKeysOn selects "on".

GetClipboardBoth : GetClipboard
constant [source]
constant [source]
GetClipboardBoth

GetClipboardBoth selects "both".

GetClipboardBuffer : GetClipboard
constant [source]
constant [source]
GetClipboardBuffer

GetClipboardBuffer selects "buffer".

GetClipboardOff : GetClipboard
constant [source]
constant [source]
GetClipboardOff

GetClipboardOff selects "off".

GetClipboardRequest : GetClipboard
constant [source]
constant [source]
GetClipboardRequest

GetClipboardRequest selects "request".

MenuBorderLinesDouble : MenuBorderLines
constant [source]
constant [source]
MenuBorderLinesDouble

MenuBorderLinesDouble selects "double".

MenuBorderLinesHeavy : MenuBorderLines
constant [source]
constant [source]
MenuBorderLinesHeavy

MenuBorderLinesHeavy selects "heavy".

MenuBorderLinesNone : MenuBorderLines
constant [source]
constant [source]
MenuBorderLinesNone

MenuBorderLinesNone selects "none".

MenuBorderLinesPadded : MenuBorderLines
constant [source]
constant [source]
MenuBorderLinesPadded

MenuBorderLinesPadded selects "padded".

MenuBorderLinesRounded : MenuBorderLines
constant [source]
constant [source]
MenuBorderLinesRounded

MenuBorderLinesRounded selects "rounded".

MenuBorderLinesSimple : MenuBorderLines
constant [source]
constant [source]
MenuBorderLinesSimple

MenuBorderLinesSimple selects "simple".

MenuBorderLinesSingle : MenuBorderLines
constant [source]
constant [source]
MenuBorderLinesSingle

MenuBorderLinesSingle selects "single".

MessageLine0 : MessageLine
constant [source]
constant [source]
MessageLine0

MessageLine0 selects "0".

MessageLine1 : MessageLine
constant [source]
constant [source]
MessageLine1

MessageLine1 selects "1".

MessageLine2 : MessageLine
constant [source]
constant [source]
MessageLine2

MessageLine2 selects "2".

MessageLine3 : MessageLine
constant [source]
constant [source]
MessageLine3

MessageLine3 selects "3".

MessageLine4 : MessageLine
constant [source]
constant [source]
MessageLine4

MessageLine4 selects "4".

ModeKeysEmacs : ModeKeys
constant [source]
constant [source]
ModeKeysEmacs

ModeKeysEmacs selects "emacs".

ModeKeysVi : ModeKeys
constant [source]
constant [source]
ModeKeysVi

ModeKeysVi selects "vi".

OptionOriginInherited : OptionOrigin
constant [source]
constant [source]
OptionOriginInherited

OptionOriginInherited identifies a value inherited from a parent scope.

OptionOriginLocal : OptionOrigin
constant [source]
constant [source]
OptionOriginLocal

OptionOriginLocal identifies a value set directly at the queried scope.

PopupBorderLinesDouble : PopupBorderLines
constant [source]
constant [source]
PopupBorderLinesDouble

PopupBorderLinesDouble selects "double".

PopupBorderLinesHeavy : PopupBorderLines
constant [source]
constant [source]
PopupBorderLinesHeavy

PopupBorderLinesHeavy selects "heavy".

PopupBorderLinesNone : PopupBorderLines
constant [source]
constant [source]
PopupBorderLinesNone

PopupBorderLinesNone selects "none".

PopupBorderLinesPadded : PopupBorderLines
constant [source]
constant [source]
PopupBorderLinesPadded

PopupBorderLinesPadded selects "padded".

PopupBorderLinesRounded : PopupBorderLines
constant [source]
constant [source]
PopupBorderLinesRounded

PopupBorderLinesRounded selects "rounded".

PopupBorderLinesSimple : PopupBorderLines
constant [source]
constant [source]
PopupBorderLinesSimple

PopupBorderLinesSimple selects "simple".

PopupBorderLinesSingle : PopupBorderLines
constant [source]
constant [source]
PopupBorderLinesSingle

PopupBorderLinesSingle selects "single".

RemainOnExitFailed : RemainOnExit
constant [source]
constant [source]
RemainOnExitFailed

RemainOnExitFailed selects "failed".

RemainOnExitKey : RemainOnExit
constant [source]
constant [source]
RemainOnExitKey

RemainOnExitKey selects "key".

RemainOnExitOff : RemainOnExit
constant [source]
constant [source]
RemainOnExitOff

RemainOnExitOff selects "off".

RemainOnExitOn : RemainOnExit
constant [source]
constant [source]
RemainOnExitOn

RemainOnExitOn selects "on".

SetClipboardExternal : SetClipboard
constant [source]
constant [source]
SetClipboardExternal

SetClipboardExternal selects "external".

SetClipboardOff : SetClipboard
constant [source]
constant [source]
SetClipboardOff

SetClipboardOff selects "off".

SetClipboardOn : SetClipboard
constant [source]
constant [source]
SetClipboardOn

SetClipboardOn selects "on".

Status2 : Status
constant [source]
constant [source]
Status2

Status2 selects "2".

Status3 : Status
constant [source]
constant [source]
Status3

Status3 selects "3".

Status4 : Status
constant [source]
constant [source]
Status4

Status4 selects "4".

Status5 : Status
constant [source]
constant [source]
Status5

Status5 selects "5".

StatusJustifyAbsoluteCentre : StatusJustify
constant [source]
constant [source]
StatusJustifyAbsoluteCentre

StatusJustifyAbsoluteCentre selects "absolute-centre".

StatusJustifyCentre : StatusJustify
constant [source]
constant [source]
StatusJustifyCentre

StatusJustifyCentre selects "centre".

StatusJustifyLeft : StatusJustify
constant [source]
constant [source]
StatusJustifyLeft

StatusJustifyLeft selects "left".

StatusJustifyRight : StatusJustify
constant [source]
constant [source]
StatusJustifyRight

StatusJustifyRight selects "right".

StatusKeysEmacs : StatusKeys
constant [source]
constant [source]
StatusKeysEmacs

StatusKeysEmacs selects "emacs".

StatusKeysVi : StatusKeys
constant [source]
constant [source]
StatusKeysVi

StatusKeysVi selects "vi".

StatusOff : Status
constant [source]
constant [source]
StatusOff

StatusOff selects "off".

StatusOn : Status
constant [source]
constant [source]
StatusOn

StatusOn selects "on".

StatusPositionBottom : StatusPosition
constant [source]
constant [source]
StatusPositionBottom

StatusPositionBottom selects "bottom".

StatusPositionTop : StatusPosition
constant [source]
constant [source]
StatusPositionTop

StatusPositionTop selects "top".

VisualActivityBoth : VisualActivity
constant [source]
constant [source]
VisualActivityBoth

VisualActivityBoth selects "both".

VisualActivityOff : VisualActivity
constant [source]
constant [source]
VisualActivityOff

VisualActivityOff selects "off".

VisualActivityOn : VisualActivity
constant [source]
constant [source]
VisualActivityOn

VisualActivityOn selects "on".

VisualBellBoth : VisualBell
constant [source]
constant [source]
VisualBellBoth

VisualBellBoth selects "both".

VisualBellOff : VisualBell
constant [source]
constant [source]
VisualBellOff

VisualBellOff selects "off".

VisualBellOn : VisualBell
constant [source]
constant [source]
VisualBellOn

VisualBellOn selects "on".

VisualSilenceBoth : VisualSilence
constant [source]
constant [source]
VisualSilenceBoth

VisualSilenceBoth selects "both".

VisualSilenceOff : VisualSilence
constant [source]
constant [source]
VisualSilenceOff

VisualSilenceOff selects "off".

VisualSilenceOn : VisualSilence
constant [source]
constant [source]
VisualSilenceOn

VisualSilenceOn selects "on".

Keys and bindings 1 type, 2 functions and constants
PrefixKey 0 members

PrefixKey selects the primary or secondary tmux prefix key. Its zero value selects the primary prefix.

PrefixPrimary : PrefixKey
constant [source]
constant [source]
PrefixPrimary

PrefixPrimary selects tmux's primary prefix key.

PrefixSecondary : PrefixKey
constant [source]
constant [source]
PrefixSecondary

PrefixSecondary selects tmux's secondary prefix key.

Environment 1 type
EnvironmentValue 2 members

EnvironmentValue is one tmux environment value or removal marker. Its zero value is an ordinary empty value, not a removal marker.

Terminal capabilities 7 types
TerminalFeature 2 members

TerminalFeature is one terminal pattern and its enabled features.

TerminalFeatures 3 members

TerminalFeatures is an immutable parsed terminal-features option. Its zero value is an empty collection: Len is zero, Lookup reports false, and Entries returns a nonnil empty slice.

TerminalOverrideValue 4 members

TerminalOverrideValue is a flag, arbitrary-precision integer, or string. Its zero value has no recognized kind: IsFlag is false, Integer and Text report false, and it represents no parsed capability assignment.

TerminalCapability 2 members

TerminalCapability is one parsed terminal override capability.

TerminalOverride 3 members

TerminalOverride is the immutable capability set for one terminal pattern. Its zero value is an empty immutable collection: Len is zero, Lookup reports false, and Entries returns a nonnil empty slice.

TerminalOverrideEntry 2 members

TerminalOverrideEntry is one terminal pattern and its parsed capabilities.

TerminalOverrides 3 members

TerminalOverrides is an immutable parsed terminal-overrides option. Its zero value is an empty immutable collection: Len is zero, Lookup reports false, and Entries returns a nonnil empty slice.

Versions 1 type, 5 functions and constants
Version 7 members

Version is a parsed tmux version that preserves its original token. Obtain a value with ParseVersion , Server.Version , or Snapshot.Version . Its zero value has no feature level and is useful only as an absent version. Parsed OpenBSD base-system tokens also have no feature level until Server.Version probes the configured binary's commands.

MinimumConnectionVersion
constant [source]
constant [source]
MinimumConnectionVersion

MinimumConnectionVersion is the oldest tmux feature level that supports terminal Connection ownership. Later releases may strengthen individual lifecycle guarantees without changing this floor.

MinimumSupportedVersion
constant [source]
constant [source]
MinimumSupportedVersion

MinimumSupportedVersion is the oldest tmux feature level supported by this package.

ModulePath
constant [source]
constant [source]
ModulePath

ModulePath is the Go module this package belongs to. It is the module path rather than the package path, because that is what Go build metadata records.

PackageVersion ( ) → (string, bool)
function [source]
function [source]
PackageVersion

PackageVersion returns the release version recorded in Go build metadata. Development builds and binaries without module metadata return "", false.

ParseVersion ( raw : string ) → (Version, error)
function [source]
function [source]
ParseVersion

ParseVersion parses a raw tmux version token. It returns a VersionError matching ErrInvalidVersion when the token cannot be parsed.

Commands 8 types, 2 functions and constants
CommandAlias 2 members

CommandAlias is one parsed command-alias entry.

CommandAliases 3 members

CommandAliases is an immutable parsed command-alias option. Its zero value is an empty collection: Len is zero, Lookup reports false, and Entries returns a nonnil empty slice.

Connection 6 members

Connection owns terminal control-mode transport to the exact daemon that materialized its session. Values obtained from Server or Session retain the connection. Closing is terminal: they neither reconnect nor fall back to a subprocess. Its lanes are attached tmux clients; closing the last client can trigger tmux's destroy-unattached or exit-unattached policy. On tmux 3.6 or later, destroying its initial session moves the clients to another session when one exists; the retained Session value keeps its original identity.

CommandTransport 1 members

CommandTransport names how one tmux command reached tmux.

CommandTrace 6 members

CommandTrace records one completed attempt to run a tmux command. It carries neither the argument vector nor tmux's output, both of which may hold passwords, tokens, or pane contents; CommandError is where a caller that accepts that reads them.

CommandObserver 0 members

CommandObserver receives one CommandTrace per tmux command a Server and the values derived from it run:

Running 4 members

Running is a command started by Session.Start : a real process, already under way, in a pane of its own. Running.Pane exposes that pane so its output can be streamed with Pane.OpenObservation or typed into with Pane.Writer while the command runs; Running.Wait and Running.Kill wait for and stop it. A line printed with nothing separating it from the command's own exit can race tmux's control-mode notification of it and never reach PaneObservation.Reader ; RunResult.Lines from Wait, a plain screen capture rather than that notification stream, always has it.

Command 5 members

Command is one command to run in a pane. YAML accepts either a bare string or a mapping, so "echo hi" and {cmd: echo hi, sleep_before: 2} are both commands.

CommandTransportConnection : CommandTransport
constant [source]
constant [source]
CommandTransportConnection

CommandTransportConnection carried the command over a control-mode connection opened earlier.

CommandTransportProcess : CommandTransport
constant [source]
constant [source]
CommandTransportProcess

CommandTransportProcess ran the command as its own tmux process.

Control mode 5 types, 1 function or constant
ControlClient 11 members

ControlClient is one attached tmux control-mode process. Create one with Server.OpenControl . Concurrent Cmd, Wait, and close calls are supported; exactly one caller may execute NextNotification at a time.

ControlNotification 4 members

ControlNotification is an immutable parsed tmux control-mode notification. Its zero value has an empty kind and no arguments. Values returned by ParseControlNotification own copied arguments and are safe to retain.

SubscriptionChange 6 members

SubscriptionChange is one evaluated format value reported by a subscription armed with NotificationStream.Subscribe . The scope fields tmux did not evaluate against are zero: a session-scoped subscription reports no window or pane, and a window-scoped one reports no pane.

PaneObservation 10 members

PaneObservation is one visible pane baseline followed by the exact control notification stream after that baseline. That stream is the observation's whole control connection, so a caller wanting only this pane's output selects it by identifier. Create one with Pane.OpenObservation and close it when finished. Copies share notification reader ownership, terminal loss, and client lifetime; closing one closes them all.

NotificationStream 7 members

NotificationStream owns one observation-only control client attached to a session. It yields tmux notifications in wire order and must be closed. Before tmux 3.6, destroying the attached session follows that session's detach-on-destroy policy and may end the stream.

ParseControlNotification ( line : []byte ) → (ControlNotification, error)
function [source]
function [source]
ParseControlNotification

ParseControlNotification parses one newline-free tmux control-mode notification record. It requires exact control framing and a supported kind, returns errors compatible with ErrMalformedControlNotification or ErrUnknownControlNotification , and copies all caller-owned input before returning. It never returns a partial notification.

Formats 2 types, 2 functions and constants
FormatValues 195 members

FormatValues is a read-only view of format expansions materialized with a Session, Window, Pane, or Client. Its methods do not query tmux. Projected cross-scope fields do not imply that the referenced record was materialized.

ExtendedKeysFormat 2 members

ExtendedKeysFormat is a typed value for the "extended-keys-format" tmux option. Its zero value is invalid.

ExtendedKeysFormatCSIU : ExtendedKeysFormat
constant [source]
constant [source]
ExtendedKeysFormatCSIU

ExtendedKeysFormatCSIU selects "csi-u".

ExtendedKeysFormatXTerm : ExtendedKeysFormat
constant [source]
constant [source]
ExtendedKeysFormatXTerm

ExtendedKeysFormatXTerm selects "xterm".

Queries 8 types, 32 functions and constants
SessionFilter 15 members

SessionFilter matches materialized Session values without tmux I/O. Its zero value matches every non-nil candidate. Criteria are ANDed; AnyOf adds an OR requirement and Not excludes. Field and relation criteria correspond to Session.ID , Session.Name , Session.Attached , Session.Windows , and Session.Panes . SessionFilter.Validate and methods that consume the filter reject invalid criteria with ErrInvalidFilter .

WindowFilter 23 members

WindowFilter matches materialized Window values without tmux I/O. Its zero value matches every non-nil candidate. Criteria are ANDed; AnyOf adds an OR requirement and Not excludes. Field and relation criteria correspond to Window.SessionID , Window.ID , Window.Index , Window.Name , Window.Active , Window.Session , and Window.Panes . WindowFilter.Validate and methods that consume the filter reject invalid criteria with ErrInvalidFilter .

PaneFilter 35 members

PaneFilter matches materialized Pane values without tmux I/O. Its zero value matches every non-nil candidate. Criteria are ANDed; AnyOf adds an OR requirement and Not excludes. Field and relation criteria correspond to Pane.SessionID , Pane.WindowID , Pane.ID , Pane.WindowIndex , Pane.Index , Pane.CurrentCommand , Pane.Active , Pane.Title , Pane.Session , and Pane.Window . PaneFilter.Validate and methods that consume the filter reject invalid criteria with ErrInvalidFilter .

ClientFilter 14 members

ClientFilter matches materialized Client values without tmux I/O. Its zero value matches every non-nil candidate. Criteria are ANDed; AnyOf adds an OR requirement and Not excludes. Field and relation criteria correspond to Client.Name , Client.ReadOnly , Client.AttachedSession , Client.AttachedWindow , and Client.AttachedPane . ClientFilter.Validate and methods that consume the filter reject invalid criteria with ErrInvalidFilter .

WindowRel 5 members

WindowRel applies quantifiers to a materialized Window relation; its zero value is invalid. Some is existential, Every is universal and vacuously true for an empty relation, and None excludes; enabled quantifiers are conjunctive.

PaneRel 5 members

PaneRel applies quantifiers to a materialized Pane relation; its zero value is invalid. Some is existential, Every is universal and vacuously true for an empty relation, and None excludes; enabled quantifiers are conjunctive.

TmuxFilter 0 members

TmuxFilter is a raw tmux -f format expression. It is distinct from the generated local filter structs and is evaluated only by tmux. A nil filter omits -f; a nonnil empty filter sends an explicit empty expression.

Filter 0 members

Filter is anything that compiles itself into a predicate over T, which is what the tmux package's generated model filters do. It exists so a filter and a query can meet without this package naming a model.

FilterSchemaVersion
constant [source]
constant [source]
FilterSchemaVersion

FilterSchemaVersion identifies external metadata for the generated filter JSON wire schema. It is not embedded in JSON and is independent of the tmux Version .

ClientNameIs ( value : ClientName ) → ClientFilter
function [source]
function [source]
ClientNameIs

ClientNameIs returns a ClientFilter that exactly matches the stable tmux client name from Client.Name. It sets no other criteria and does not validate value.

ClientReadOnlyIs ( value : bool ) → ClientFilter
function [source]
function [source]
ClientReadOnlyIs

ClientReadOnlyIs returns a ClientFilter that exactly matches the materialized read-only state from Client.ReadOnly. It sets no other criteria and does not validate value.

ExactlyOne ( values : []T , predicate : func(*T) bool ) → (T, error)
function [source]
function [source]
ExactlyOne

ExactlyOne returns a shallow copy when exactly one source-ordered value is accepted by predicate. It examines values until source exhaustion confirms a sole match, or stops at the second match. It returns the zero value of T with ErrNoMatch for no matches or ErrMultipleMatches for multiple matches; callers can classify either error with errors.Is.

Discussed in Filtering and querying, in practice

ExactlyOneSeq ( values : iter.Seq[T] , predicate : func(*T) bool ) → (T, error)
function [source]
function [source]
ExactlyOneSeq

ExactlyOneSeq returns a shallow copy when exactly one source-ordered sequence value is accepted by predicate. It stops pulling at the second match. If input ends with no matches, it returns the zero value of T with ErrNoMatch ; if it finds a second match, it returns the zero value of T with ErrMultipleMatches . Callers can classify either error with errors.Is. With an infinite input, ExactlyOneSeq returns only after a second match; it cannot confirm a no-match or exactly-one result without source exhaustion.

First ( values : []T , predicate : func(*T) bool ) → (T, bool)
function [source]
function [source]
First

First returns a shallow copy of the first source-ordered value accepted by predicate and stops evaluating later values. If no value matches, it returns the zero value of T and false.

FirstSeq ( values : iter.Seq[T] , predicate : func(*T) bool ) → (T, bool)
function [source]
function [source]
FirstSeq

FirstSeq returns a shallow copy of the first source-ordered sequence value accepted by predicate and stops pulling later values. If no value matches, it returns the zero value of T and false. With an infinite input that never matches, FirstSeq does not return.

Matching ( values : []T , filter : Filter[T] ) → ([]T, error)
function [source]
function [source]
Matching

Matching returns a fresh slice of shallow copies for values that filter accepts, retaining their source order, and reports the one error a filter can have rather than leaving it for the caller to unpack first. It evaluates every input value, so a no-match result is an empty slice.

active, err := tmuxq.Matching(snapshot.Panes(), tmux.PaneActiveIs(true))

MatchingSeq ( values : iter.Seq[T] , filter : Filter[T] ) → (iter.Seq[T], error)
function [source]
function [source]
MatchingSeq

MatchingSeq returns a lazy sequence of shallow copies for values that filter accepts, retaining source order. The filter is compiled before iteration begins, so an invalid filter is an error here rather than a sequence that yields nothing.

PaneActiveIs ( value : bool ) → PaneFilter
function [source]
function [source]
PaneActiveIs

PaneActiveIs returns a PaneFilter that exactly matches the materialized active state from Pane.Active. It sets no other criteria and does not validate value.

PaneCommandIs ( value : string ) → PaneFilter
function [source]
function [source]
PaneCommandIs

PaneCommandIs returns a PaneFilter that exactly matches the materialized current command from Pane.CurrentCommand. It sets no other criteria and does not validate value.

PaneIDIs ( value : PaneID ) → PaneFilter
function [source]
function [source]
PaneIDIs

PaneIDIs returns a PaneFilter that exactly matches the stable tmux pane identifier from Pane.ID, including its % sigil. It sets no other criteria and does not validate value.

PaneIndexIs ( value : int ) → PaneFilter
function [source]
function [source]
PaneIndexIs

PaneIndexIs returns a PaneFilter that exactly matches the nonnegative pane index from Pane.Index. It sets no other criteria and does not validate value.

PaneSessionIDIs ( value : SessionID ) → PaneFilter
function [source]
function [source]
PaneSessionIDIs

PaneSessionIDIs returns a PaneFilter that exactly matches the stable tmux session identifier from Pane.SessionID, including its $ sigil. It sets no other criteria and does not validate value.

PaneTitleIs ( value : string ) → PaneFilter
function [source]
function [source]
PaneTitleIs

PaneTitleIs returns a PaneFilter that exactly matches the materialized title from Pane.Title. It sets no other criteria and does not validate value.

PaneWindowIDIs ( value : WindowID ) → PaneFilter
function [source]
function [source]
PaneWindowIDIs

PaneWindowIDIs returns a PaneFilter that exactly matches the stable tmux window identifier from Pane.WindowID, including its @ sigil. It sets no other criteria and does not validate value.

PaneWindowIndexIs ( value : int ) → PaneFilter
function [source]
function [source]
PaneWindowIndexIs

PaneWindowIndexIs returns a PaneFilter that exactly matches the nonnegative winlink index from Pane.WindowIndex. It sets no other criteria and does not validate value.

ParseClientLookup ( lookup : string , values : string ) → (ClientFilter, error)
function [source]
function [source]
ParseClientLookup

ParseClientLookup converts a lookup path into a concrete client filter. Paths traverse generated JSON relation names and separate segments with double underscores. The default operator is exact. Accepted suffixes are eq, exact, iexact, contains, icontains, startswith, istartswith, endswith, iendswith, in, nin, regex, and iregex; availability is field-specific. The eq suffix aliases exact, nin negates in, scalar operators require one value, and in and nin require one or more. Invalid paths, operators, values, or results wrap ErrInvalidFilter .

ParsePaneLookup ( lookup : string , values : string ) → (PaneFilter, error)
function [source]
function [source]
ParsePaneLookup

ParsePaneLookup converts a lookup path into a concrete pane filter. Paths traverse generated JSON relation names and separate segments with double underscores. The default operator is exact. Accepted suffixes are eq, exact, iexact, contains, icontains, startswith, istartswith, endswith, iendswith, in, nin, regex, and iregex; availability is field-specific. The eq suffix aliases exact, nin negates in, scalar operators require one value, and in and nin require one or more. Invalid paths, operators, values, or results wrap ErrInvalidFilter .

ParseSessionLookup ( lookup : string , values : string ) → (SessionFilter, error)
function [source]
function [source]
ParseSessionLookup

ParseSessionLookup converts a lookup path into a concrete session filter. Paths traverse generated JSON relation names and separate segments with double underscores. The default operator is exact. Accepted suffixes are eq, exact, iexact, contains, icontains, startswith, istartswith, endswith, iendswith, in, nin, regex, and iregex; availability is field-specific. The eq suffix aliases exact, nin negates in, scalar operators require one value, and in and nin require one or more. Invalid paths, operators, values, or results wrap ErrInvalidFilter .

ParseWindowLookup ( lookup : string , values : string ) → (WindowFilter, error)
function [source]
function [source]
ParseWindowLookup

ParseWindowLookup converts a lookup path into a concrete window filter. Paths traverse generated JSON relation names and separate segments with double underscores. The default operator is exact. Accepted suffixes are eq, exact, iexact, contains, icontains, startswith, istartswith, endswith, iendswith, in, nin, regex, and iregex; availability is field-specific. The eq suffix aliases exact, nin negates in, scalar operators require one value, and in and nin require one or more. Invalid paths, operators, values, or results wrap ErrInvalidFilter .

Ptr ( value : T ) → *T
function [source]
function [source]
Ptr

Ptr returns a distinct pointer to a shallow copy of value, including when T has zero size. Its nonzero holder prevents Go from coalescing zero-size addresses. Slices, maps, pointers, and other reference-bearing values still alias their referenced data. Ptr performs no validation or ownership transfer.

SessionAttachedIs ( value : bool ) → SessionFilter
function [source]
function [source]
SessionAttachedIs

SessionAttachedIs returns a SessionFilter that exactly matches the materialized attachment state from Session.Attached. It sets no other criteria and does not validate value.

SessionIDIs ( value : SessionID ) → SessionFilter
function [source]
function [source]
SessionIDIs

SessionIDIs returns a SessionFilter that exactly matches the stable tmux session identifier from Session.ID, including its $ sigil. It sets no other criteria and does not validate value.

SessionNameIs ( value : string ) → SessionFilter
function [source]
function [source]
SessionNameIs

SessionNameIs returns a SessionFilter that exactly matches the materialized session name from Session.Name. It sets no other criteria and does not validate value.

Where ( values : []T , predicate : func(*T) bool ) → []T
function [source]
function [source]
Where

Where returns a fresh slice of shallow copies for values accepted by predicate, retaining their source order. It evaluates every input value, so a no-match result is an empty slice.

Discussed in Filtering and queries · Filtering and querying, in practice

WhereSeq ( values : iter.Seq[T] , predicate : func(*T) bool ) → iter.Seq[T]
function [source]
function [source]
WhereSeq

WhereSeq returns a lazy sequence of shallow copies for values accepted by predicate, retaining source order. It does not pull values until the result is iterated. When its consumer stops, WhereSeq stops pulling from values. For an infinite input, it runs until its consumer stops.

WindowActiveIs ( value : bool ) → WindowFilter
function [source]
function [source]
WindowActiveIs

WindowActiveIs returns a WindowFilter that exactly matches the materialized active state from Window.Active. It sets no other criteria and does not validate value.

WindowIDIs ( value : WindowID ) → WindowFilter
function [source]
function [source]
WindowIDIs

WindowIDIs returns a WindowFilter that exactly matches the stable tmux window identifier from Window.ID, including its @ sigil. It sets no other criteria and does not validate value.

WindowIndexIs ( value : int ) → WindowFilter
function [source]
function [source]
WindowIndexIs

WindowIndexIs returns a WindowFilter that exactly matches the nonnegative winlink index from Window.Index. It sets no other criteria and does not validate value.

WindowNameIs ( value : string ) → WindowFilter
function [source]
function [source]
WindowNameIs

WindowNameIs returns a WindowFilter that exactly matches the materialized window name from Window.Name. It sets no other criteria and does not validate value.

WindowSessionIDIs ( value : SessionID ) → WindowFilter
function [source]
function [source]
WindowSessionIDIs

WindowSessionIDIs returns a WindowFilter that exactly matches the stable tmux session identifier from Window.SessionID, including its $ sigil. It sets no other criteria and does not validate value.

Snapshots 2 types, 2 functions and constants
CapturePosition 0 members

CapturePosition selects a line relative to tmux's visible pane or history. Its zero value omits the boundary and lets tmux use the visible-screen default. Construct numeric positions with CaptureLine .

Snapshot 17 members

Snapshot is an immutable, observational view of one tmux server. It is normally returned by Server.Snapshot . Its zero value has a zero Version , a zero Server , non-nil empty collection slices, and not-found point lookups. Accessors never query tmux; returned slices are newly allocated and their contained records are shallow copies.

CaptureBoundary : CapturePosition
constant [source]
constant [source]
CaptureBoundary

CaptureBoundary selects the start of history when used as Start and the end of the visible pane when used as End.

CaptureLine ( line : int ) → CapturePosition
function [source]
function [source]
CaptureLine

CaptureLine returns the canonical tmux representation of a capture line. Zero is the first visible line; negative values address history.

Workspaces 6 types, 4 functions and constants
Ref 1 members

Ref addresses an existing object or one an earlier Plan step will create. This permits forward construction without tmux I/O. The zero Ref addresses nothing and makes a targeted operation fail validation.

Op 2 members

Op is one tmux command a Plan has recorded but not run. Build one with a Plan method rather than directly; the zero value records nothing.

Dispatch 2 members

Dispatch is one tmux invocation and the operations it carries. A dispatch holding more than one operation is sent as a tmux command list.

Sequential 1 members

Sequential sends every operation as its own tmux invocation. It is the simplest correct planner, and useful as a baseline: a plan produces the same results through it as through Folding , at one invocation per operation.

Folding 1 members

Folding groups each run of operations that neither answer nor create into one tmux command list, and sends the rest alone. It is what Plan.Run uses.

OpStatus 1 members

OpStatus reports what became of one operation in a plan.

OpComplete : OpStatus
constant [source]
constant [source]
OpComplete

OpComplete is an operation tmux ran successfully.

OpFailed : OpStatus
constant [source]
constant [source]
OpFailed

OpFailed is an operation tmux refused. Only an operation sent alone can receive this status.

OpIndeterminate : OpStatus
constant [source]
constant [source]
OpIndeterminate

OpIndeterminate is an operation dispatched without enough reply evidence to prove whether tmux applied or rejected it.

OpSkipped : OpStatus
constant [source]
constant [source]
OpSkipped

OpSkipped is an operation the plan did not dispatch because an earlier dispatch failed or became indeterminate.

Workspaces — Plans 3 types, 1 function or constant
Plan 62 members

Plan records ordered tmux commands for later execution. It groups commands that need no answer and lets later steps reference objects earlier steps create.

Planner 0 members

Planner groups a plan's operations into tmux invocations.

Workspace 12 members

Workspace is one tmuxp-style session description.

NewPlan ( ) → *Plan
function [source]
function [source]
NewPlan

NewPlan returns an empty Plan .

Workspaces — Session 1 function or constant
SessionRef ( id : SessionID ) → Ref
function [source]
function [source]
SessionRef

SessionRef returns a selector-relative Ref addressing a session by ID, for a caller holding an identifier rather than a materialized record.

Workspaces — Window 1 function or constant
WindowRef ( id : WindowID ) → Ref
function [source]
function [source]
WindowRef

WindowRef returns a selector-relative Ref addressing a window by ID, for a caller holding an identifier rather than a materialized record.

Workspaces — Pane 1 function or constant
PaneRef ( id : PaneID ) → Ref
function [source]
function [source]
PaneRef

PaneRef returns a selector-relative Ref addressing a pane by ID, for a caller holding an identifier rather than a materialized record.

Requests 29 types, 2 functions and constants
DisplayMessageRequest 9 members

DisplayMessageRequest configures display-message options shared by server, window, and pane scope. A zero request displays tmux's default message and returns nil. Print returns an owned stdout slice instead of displaying only to a client status line. Nil pointer fields omit their flags while pointers to empty values are explicit; a zero TargetClient omits its flag.

SubscriptionRequest 5 members

SubscriptionRequest names a format for tmux to evaluate and report on this stream whenever its value changes. Its zero value is invalid because Name and Format are required. At most one of Session, Window, and Pane scopes the evaluation; none evaluates against the stream's attached session.

SendKeysRequest 11 members

SendKeysRequest configures tmux key input. Pointer values are copied before I/O and must not be mutated concurrently.

SendKeySequenceRequest 2 members

SendKeySequenceRequest configures ordered pane key delivery. Keys must contain at least one nonempty operand. SendKeySequence copies Keys before I/O; callers must not mutate it concurrently with the call.

ClearHistoryRequest 1 members

ClearHistoryRequest configures pane history clearing. Its zero value clears scrollback without requesting hyperlink cleanup.

CopyModeRequest 6 members

CopyModeRequest configures tmux copy mode. Its zero value enters copy mode on the receiver without scrolling. Fields may be combined. tmux resolves the receiver and optional SourcePane before processing Cancel, so a stale target can prevent reset. After resolution, Cancel takes precedence over other actions, though SourcePane validation and the PageDown version probe still occur first.

ChooseTreeRequest 7 members

ChooseTreeRequest configures the interactive session and window chooser. Its zero value uses tmux defaults. Format and Filter are copied before execution and must not be mutated concurrently.

DisplayPopupRequest 18 members

DisplayPopupRequest configures a popup overlay. Pointer and map values are copied before I/O and must not be mutated concurrently. Pointer fields distinguish omission from an explicit empty value, with the Command and StartDirectory behavior documented on those fields.

PasteBufferRequest 6 members

PasteBufferRequest configures one tmux paste-buffer operation. Its zero value pastes the top buffer, replaces linefeeds with tmux's default carriage-return separator, and uses the version's default control-character handling. Pointer values are copied before I/O and must not be mutated concurrently.

SetPlanOptionRequest 7 members

SetPlanOptionRequest names one tmux option write for Plan.SetOption . Its zero value is invalid, because Name is required.

PromptHistoryRequest 1 members

PromptHistoryRequest selects one prompt-history class. A zero request selects every class.

SetBufferRequest 3 members

SetBufferRequest configures storing data in a tmux paste buffer. Its zero value writes an empty most-recent buffer; nil Name selects that buffer while a pointer to an empty name is explicit.

SaveBufferRequest 3 members

SaveBufferRequest configures writing a tmux paste buffer to a file. Its zero value is invalid because Path is required; nil Name selects the most-recent buffer and a pointer to an empty name is explicit.

LoadBufferRequest 2 members

LoadBufferRequest configures loading a file into a tmux paste buffer. Its zero value is invalid because Path is required; nil Name lets tmux allocate a buffer and a pointer to an empty name is explicit.

ListBuffersRequest 2 members

ListBuffersRequest configures tmux's live paste-buffer listing. Its zero value requests tmux's default output; nil Format and Filter omit their flags, whereas pointers to empty strings are explicit expressions.

RunShellRequest 8 members

RunShellRequest configures a command executed by tmux's run-shell command. Its zero value is invalid because Command is required. Pointer fields distinguish omitted flags from explicit empty arguments; RunShell copies Delay, StartDirectory, and Args before invoking tmux.

WaitForRequest 2 members

WaitForRequest configures a wait, signal, lock, or unlock operation. Its zero value waits on the required nonempty Channel.

IfShellRequest 5 members

IfShellRequest configures conditional execution of a tmux command. Its zero value is invalid because ShellCommand and ThenCommand are required; nil ElseCommand omits the failure branch while a pointer to an empty string is explicit.

SourceFileRequest 4 members

SourceFileRequest configures loading or parsing a tmux configuration file. Its zero value is invalid because Path is required; SourceFile expands only the current user's ~ forms and copies no caller-owned mutable input.

ConfirmBeforeRequest 5 members

ConfirmBeforeRequest configures a background tmux confirmation prompt. Its zero value is invalid because Command is required. Nil pointer fields omit their flags while explicit empty strings are passed to tmux; ConfirmKey must be one printable ASCII character.

CommandPromptRequest 13 members

CommandPromptRequest configures a background tmux command prompt. Its zero value is invalid because Template is required; nil pointer fields omit flags while explicit empty values are passed to tmux.

DisplayMenuRequest 13 members

DisplayMenuRequest configures one tmux popup menu. Position and style strings retain tmux's format and symbolic-position languages verbatim. Its zero value is invalid because Items is required. All pointer fields omit their flags when nil and retain explicit empty strings; DisplayMenu copies Items before calling tmux. TargetPane and TargetClient are independent but must be stable identities when present.

BindKeyRequest 5 members

BindKeyRequest configures one tmux key binding. Its zero value is invalid because Key is required; nil KeyTable and Note omit their flags while pointers to empty strings are explicit.

UnbindKeyRequest 4 members

UnbindKeyRequest selects one key or an entire key table to unbind. Exactly one of Key and AllKeys must be set.

ListKeysRequest 2 members

ListKeysRequest configures raw key-binding output. Its zero value selects tmux's default table and format; nil fields omit flags while explicit empty pointers are passed to tmux.

ListCommandsRequest 1 members

ListCommandsRequest optionally limits output to one tmux command or alias. Nil CommandName lists all commands; a pointer to an empty name is explicit.

ShowMessagesRequest 3 members

ShowMessagesRequest selects the target and server information to print. Terminals and Jobs are independent and may both be enabled.

SelectLayoutRequest 4 members

SelectLayoutRequest selects one layout operation. Its zero value reapplies the last preset layout. Layout, Spread, Next, and Previous are mutually exclusive and are validated before execution; an empty Layout is omitted rather than passed explicitly. The request contains no retained caller-owned storage and is supported on tmux 3.2a or later.

RespawnRequest 4 members

RespawnRequest configures restarting a window's or pane's process on tmux 3.2a or later. Its zero value reuses the stored command and directory and requires the target process to be inactive. Nil pointer fields omit their options; nonnil pointers are explicit, including empty strings. There are no mutually exclusive fields. Arguments and environment entries are validated before execution.

ErrInvalidCaptureRequest
attribute [source]
attribute [source]
ErrInvalidCaptureRequest

ErrInvalidCaptureRequest identifies a capture request that cannot be represented safely as tmux arguments.

ErrInvalidRequest
attribute [source]
attribute [source]
ErrInvalidRequest

ErrInvalidRequest identifies lifecycle options rejected before execution.

Requests — Server 1 type, 1 function or constant
ServerAccessRequest 5 members

ServerAccessRequest configures tmux server access control. Its zero value is invalid: List or exactly one nonempty Allow or Deny is required. Allow and Deny, and ReadOnly and Write, are mutually exclusive; nil pointers omit their selectors while explicit empty users are rejected. List selects the returned-list path, but compatible selector and mode flags are still sent to tmux rather than ignored.

ErrInvalidServerCommandRequest
attribute [source]
attribute [source]
ErrInvalidServerCommandRequest

ErrInvalidServerCommandRequest identifies a server command request that cannot be represented safely as tmux arguments.

Requests — Session 4 types
SessionKillRequest 3 members

SessionKillRequest configures kill-session on tmux 3.2a or later. Its zero value destroys the receiver session. AllExcept destroys other sessions instead, while ClearAlerts is non-destructive. AllExcept, ClearAlerts, and Group are mutually exclusive because tmux applies a hidden precedence when more than one mode is supplied; the package rejects those combinations before execution. Group's compatibility behavior is documented on that field.

AttachSessionRequest 1 members

AttachSessionRequest selects a session name or tmux target pattern and configures a blocking terminal attachment. An empty Target lets tmux choose.

HasSessionRequest 2 members

HasSessionRequest selects exact or tmux-pattern session matching on tmux 3.2a or later. Its zero value is invalid because Target is required.

NewSessionRequest 8 members

NewSessionRequest configures session creation. Server.NewSession creates a detached session; Server.NewSessionConnection creates one attached to its first control-mode lane. Its zero value uses tmux defaults. Width and Height are either zero or 1 through 65535; KillExisting requires Name. KillExisting may remove a session before a later creation failure.

Requests — Window 11 types
KillWindowRequest 2 members

KillWindowRequest selects a window for Session.KillWindow on tmux 3.2a or later. A zero request kills the receiver session's current window, and Index is scoped to that session. Target is unrestricted tmux target syntax and may select a window in another session. Target and Index are mutually exclusive and are checked before execution. Pointer values are read during the call and are not retained; callers must not mutate them concurrently. A nil pointer omits its selector, while a nonnil pointer is explicit even when Target points to an empty string.

FindWindowRequest 6 members

FindWindowRequest configures the interactive window search chooser. Match is a tmux search operand, not a shell command. The zero value searches with an empty glob using tmux's default name, title, and visible-content scopes.

SelectWindowRequest 2 members

SelectWindowRequest selects one winlink in a Session on tmux 3.2a or later. Its zero value is invalid: exactly one of WindowID and Index is required. That mutual exclusion, stable-ID syntax, and a nonnegative Index are validated before execution. Index is read during the call and is not retained; nil omits it, a nonnil pointer is explicit, and callers must not mutate it concurrently.

NewWindowRequest 9 members

NewWindowRequest configures window creation on tmux 3.2a or later. Its zero value uses inherited defaults; placement behavior depends on the receiver. Session.NewWindow uses tmux's next free index. Window.NewWindow instead targets the receiver's occupied index and normally returns a command error; KillExisting may replace it. Window.NewWindow rejects Index. SelectExisting may run name-expansion probes before creation.

LinkWindowRequest 6 members

LinkWindowRequest configures linking a window into another session on tmux 3.2a or later. Its zero value is invalid because TargetSession is required. Nil TargetIndex asks tmux for a destination index; a nonnil value is explicit and must be nonnegative. After and Before are mutually exclusive and are rejected before execution. TargetIndex is read during the call and is not retained; callers must not mutate it concurrently.

UnlinkWindowRequest 1 members

UnlinkWindowRequest configures unlinking one exact winlink on tmux 3.2a or later. Its zero value removes the link only when the stable window has another link. The request contains no retained caller-owned storage and has no invalid field combinations.

MoveWindowRequest 7 members

MoveWindowRequest configures moving one exact winlink on tmux 3.2a or later. Its zero value moves the receiver within its current session to a tmux-chosen index and lets the moved winlink become current. Nil TargetIndex asks tmux for that index; a nonnil value is explicit and must be nonnegative. After and Before are mutually exclusive. Renumber is a standalone mode mutually exclusive with TargetIndex, After, Before, NoSelect, and KillTarget. Invalid combinations are rejected before execution. TargetIndex is read during the call and is not retained; callers must not mutate it concurrently.

SwapWindowRequest 2 members

SwapWindowRequest configures swapping the receiver with one exact winlink on tmux 3.2a or later. Its zero value is invalid because Target must be a complete Window handle. The endpoints must be proven to share a daemon through connection state or the same nonempty SocketPath; matching socket names alone are insufficient. Validation completes before execution.

WindowSelectPaneRequest 3 members

WindowSelectPaneRequest selects either one exact pane or one relative pane. Its zero value is invalid: exactly one of Target and Direction is required. Target must be a complete pane handle in the receiver's exact winlink and must be proven to share a daemon through connection state or the same nonempty SocketPath; matching socket names alone are insufficient. Invalid values are rejected before execution.

RotateWindowRequest 2 members

RotateWindowRequest configures rotate-window. Its zero value uses tmux's default rotation; enum validation happens before execution.

ResizeWindowRequest 6 members

ResizeWindowRequest selects one directional, manual, expand, or shrink operation. Height and Width may be set together. A zero request asks tmux to reapply the current manual size. Direction requires a positive Adjustment; that pair, dimensions, Expand, and Shrink are mutually exclusive and are validated before execution. Zero Adjustment, Height, and Width omit their modes; nonzero values must be positive. The request is supported on tmux 3.2a or later.

Requests — Pane 13 types
PaneDisplayMessageRequest 1 members

PaneDisplayMessageRequest adds the pane-only update behavior to the common display-message options.

CapturePaneRequest 14 members

CapturePaneRequest configures pane capture. Its zero value captures the visible screen with tmux's default text handling. Version-gated flags follow UnsupportedPolicy . CaptureBoundary selects the start of history for Start and the end of the visible pane for End.

NewPaneRequest 15 members

NewPaneRequest configures a floating pane and requires tmux 3.7 or later. Its zero value creates a detached floating pane with tmux's default size, position, styles, and command. Nil pointer fields omit their options; nonnil pointers are explicit, including empty style or message strings. Width and Height must be nonnegative. Empty and Command are mutually exclusive. Unsupported tmux versions return VersionTooLowError rather than omitting fields.

SplitPaneRequest 15 members

SplitPaneRequest configures tiled pane creation on tmux 3.2a or later. Its zero value creates a detached pane below the exact target with tmux's default size and command. Nil pointer fields omit their options; nonnil pointers are explicit, including empty style or message strings. Size and Percentage are mutually exclusive. Invalid values are rejected before tmux is mutated.

ResizePaneRequest 7 members

ResizePaneRequest selects one resize mode. Direction with Adjustment, dimensions, Zoom, Mouse, and TrimBelow are mutually exclusive modes; Height and Width may be set together. Its zero value sends a bare tmux resize-pane command rather than selecting a mode. When Direction is PaneResizeDirectionNone , Adjustment must be zero.

DisplayPanesRequest 2 members

DisplayPanesRequest configures pane-number display for tmux's current client and does not inherit the Pane target. Duration is read during the call, not retained, and must not be mutated concurrently.

PipePaneRequest 4 members

PipePaneRequest configures a pane pipe. Its flags may be combined. Command is copied before I/O and must not be mutated concurrently.

MovePaneRequest 7 members

MovePaneRequest configures move-pane on tmux 3.2a or later. Its zero value is invalid: exactly one complete TargetPane or TargetWindow handle is required. Cross-object handles must be proven to share a daemon through connection state or the same nonempty SocketPath; matching socket names alone are insufficient. Size and Percentage are mutually exclusive. Invalid enum, target, size, and percentage values are rejected before execution.

JoinPaneRequest 7 members

JoinPaneRequest configures join-pane with the same target, cross-daemon, sizing, validation, and pointer-ownership rules as MovePaneRequest .

BreakPaneRequest 2 members

BreakPaneRequest configures break-pane on tmux 3.2a or later. Its zero value moves the receiver to a detached new window with tmux's default name, except for the documented raw-version 3.7 workaround in Pane.BreakPane . Empty Name means omission and is validated before the version probe.

SwapPaneRequest 4 members

SwapPaneRequest configures swapping with an exact or adjacent pane on tmux 3.2a or later. Its zero value is invalid: exactly one complete Target or Direction is required. An explicit Target must differ from the receiver and must be proven to share a daemon through connection state or the same nonempty SocketPath; matching socket names alone are insufficient. Invalid choices are rejected before execution.

PaneSelectRequest 4 members

PaneSelectRequest configures select-pane for one exact receiver. Closed enums prevent conflicting direction, mark, and input flags. Its zero value selects the receiver. Mark rejects every other option. Input rejects Direction and KeepZoom because changing input does not select a pane. These combinations and enum ranges are validated before execution.

LastPaneRequest 2 members

LastPaneRequest configures last-pane on tmux 3.2a or later. Its zero value selects the previously active pane. Input and KeepZoom are mutually exclusive and are validated before execution; an Input mode changes the previous pane's input state without selecting it.

Requests — Client 3 types
RefreshClientRequest 2 members

RefreshClientRequest configures refreshing one tmux client. Its zero value refreshes tmux's current client; a zero TargetClient omits -t.

DetachClientRequest 2 members

DetachClientRequest configures detaching one tmux client. Its zero value detaches tmux's current client; nil fields omit their flags while an empty ShellCommand pointer is explicit.

DetachAllClientsRequest 2 members

DetachAllClientsRequest configures detaching every client except one. Its zero value keeps tmux's current client; nil fields omit their flags.

Errors 23 types, 44 functions and constants
ColorError 3 members

ColorError reports an unsupported color mode. It matches ErrUnknownColor through errors.Is; callers can recover Mode with errors.As.

CommandError 5 members

CommandError reports a completed failed high-level tmux operation. It matches ErrCommand through errors.Is; callers can recover its fields with errors.As. Generic library operations retain an owned copy of the completed command and output so tmux diagnostics remain available. Operations whose primary payload may contain secrets return an exit-code-only result instead. Callers must treat retained argv and output as potentially sensitive.

ComplexOptionDecodeError 5 members

ComplexOptionDecodeError identifies one malformed sparse-array entry without retaining its raw value.

ControlNotificationError 5 members

ControlNotificationError reports where a control-mode notification failed validation without retaining or disclosing the notification contents. Callers can use errors.Is with Category or errors.As to inspect its secret-safe location metadata. Category is ErrMalformedControlNotification or ErrUnknownControlNotification .

ControlNotificationOverflowError 5 members

ControlNotificationOverflowError reports the backlog limit and the record that would have crossed it. The queued prefix remains available first.

ControlProtocolError 4 members

ControlProtocolError reports a control-stream state violation without retaining or disclosing command output or notification contents. It matches ErrControlProtocol through errors.Is.

EnvironmentNameError 3 members

EnvironmentNameError reports a name that tmux cannot store.

EnvironmentValueError 2 members

EnvironmentValueError reports a value that cannot round-trip through show-environment. It intentionally does not retain or print the environment value.

EnvironmentDecodeError 4 members

EnvironmentDecodeError reports one malformed show-environment record. It never retains the record because environment output may contain secrets.

FormatDecodeError 6 members

FormatDecodeError identifies a malformed escaped tmux format record. It matches ErrMalformedFormatOutput through errors.Is; callers can recover its location fields with errors.As. Library-created errors do not retain decoded record values, which may contain caller data.

FromEnvError 4 members

FromEnvError reports which tmux discovery variable was missing or malformed. It never retains or prints the variable's value.

OptionDecodeError 4 members

OptionDecodeError reports a malformed recognized record without retaining its value. It matches ErrMalformedOptionOutput through errors.Is; callers can recover Record and Reason with errors.As. Record is the zero-based physical output line.

OptionValueError 3 members

OptionValueError reports a rejected typed option value without retaining or rendering that value. It matches ErrInvalidOptionValue and ErrOption .

OptionError 5 members

OptionError reports a completed high-level option or hook failure. It matches ErrOption and a specific option sentinel through errors.Is; callers can recover its fields with errors.As. Library-created errors retain only Result.ExitCode. Error never renders command output because option values and hook commands may be secret; callers may construct exported values with other contents.

CaptureRequestError 5 members

CaptureRequestError reports a CapturePaneRequest field that cannot be represented as a tmux capture-pane argument. It matches ErrInvalidCaptureRequest through errors.Is and is available through errors.As.

PlanError 4 members

PlanError reports a plan this package refused before sending anything to tmux. It matches ErrPlan through errors.Is; callers can recover Step and Reason with errors.As.

VersionQueryError 4 members

VersionQueryError reports an unsuccessful tmux -V probe. It matches ErrVersionQuery through errors.Is; callers can recover its fields with errors.As. Library-created errors retain only the exit code; command arguments and output are omitted, although callers may construct values with other contents.

VersionTooLowError 6 members

VersionTooLowError reports the installed and required tmux feature levels. It matches ErrVersionTooLow through errors.Is; callers can recover its fields with errors.As.

SnapshotDecodeError 7 members

SnapshotDecodeError identifies one malformed decoded list row. It matches ErrMalformedSnapshot through errors.Is; callers can recover its redacted location fields with errors.As.

SnapshotLookupError 5 members

SnapshotLookupError reports the cardinality of an unsuccessful point lookup. It matches ErrNotFound or ErrSnapshotAmbiguous through errors.Is; callers can recover its target and count with errors.As.

TargetError 4 members

TargetError reports a malformed stable identifier before command execution. It matches ErrInvalidTarget through errors.Is; callers can recover Object and Target with errors.As.

MissingTargetError 3 members

MissingTargetError reports an operation attempted on a zero-value model identity. It matches ErrMissingTarget through errors.Is; callers can recover Object with errors.As.

VersionError 3 members

VersionError reports a tmux version token that cannot be parsed. It matches ErrInvalidVersion through errors.Is; callers can recover Token with errors.As.

ErrAmbiguousOption
attribute [source]
attribute [source]
ErrAmbiguousOption

ErrAmbiguousOption identifies tmux's case-sensitive ambiguous-option diagnostic.

ErrCommand
attribute [source]
attribute [source]
ErrCommand

ErrCommand identifies a failed high-level tmux command. It is matched by errors.Is for CommandError .

ErrConnectionRequiresProcess
attribute [source]
attribute [source]
ErrConnectionRequiresProcess

ErrConnectionRequiresProcess identifies an operation refused because a terminal Connection cannot start a tmux process outside its owned lanes.

ErrControlClosed
attribute [source]
attribute [source]
ErrControlClosed

ErrControlClosed identifies an operation attempted after a control client began closing or lost its protocol stream.

ErrControlNotificationOverflow
attribute [source]
attribute [source]
ErrControlNotificationOverflow

ErrControlNotificationOverflow identifies a watcher that did not consume notifications before its bounded backlog filled.

ErrControlProtocol
attribute [source]
attribute [source]
ErrControlProtocol

ErrControlProtocol identifies malformed tmux control-mode framing.

ErrControlReplyCount
attribute [source]
attribute [source]
ErrControlReplyCount

ErrControlReplyCount identifies a call to ControlClient.Cmd for a command that produced zero or multiple reply frames.

ErrControlStreamLost
attribute [source]
attribute [source]
ErrControlStreamLost

ErrControlStreamLost identifies a ControlClient.NextNotification stream that ended before the caller asked to close it, distinct from the clean end an explicit Close or CloseContext produces. It is most often the underlying tmux client process exiting because the server it was attached to did.

ErrDaemonReplaced
attribute [source]
attribute [source]
ErrDaemonReplaced

ErrDaemonReplaced identifies an operation refused because the tmux server instance that produced a materialized value no longer occupies its socket.

Discussed in Socket and servers

ErrDuplicateSparseIndex
attribute [source]
attribute [source]
ErrDuplicateSparseIndex

ErrDuplicateSparseIndex identifies repeated constructor indices.

ErrInvalidCommandOutput
attribute [source]
attribute [source]
ErrInvalidCommandOutput

ErrInvalidCommandOutput identifies malformed identity output from tmux.

ErrInvalidEnvironmentName
attribute [source]
attribute [source]
ErrInvalidEnvironmentName

ErrInvalidEnvironmentName identifies a name tmux cannot store.

ErrInvalidEnvironmentValue
attribute [source]
attribute [source]
ErrInvalidEnvironmentValue

ErrInvalidEnvironmentValue identifies a value the line-oriented read API cannot round-trip.

ErrInvalidFilter
attribute [source]
attribute [source]
ErrInvalidFilter

ErrInvalidFilter reports a malformed or impossible generated filter. Filter validation, lookup parsing, predicates, and JSON methods wrap this error.

ErrInvalidOption
attribute [source]
attribute [source]
ErrInvalidOption

ErrInvalidOption identifies tmux's case-sensitive invalid-option diagnostic.

ErrInvalidOptionValue
attribute [source]
attribute [source]
ErrInvalidOptionValue

ErrInvalidOptionValue identifies a typed option value outside its active tmux-version domain.

ErrInvalidSparseIndex
attribute [source]
attribute [source]
ErrInvalidSparseIndex

ErrInvalidSparseIndex identifies a negative or overflowing sparse index.

ErrInvalidTarget
attribute [source]
attribute [source]
ErrInvalidTarget

ErrInvalidTarget identifies a malformed stable tmux identifier. It is matched by errors.Is for TargetError.

ErrInvalidVersion
attribute [source]
attribute [source]
ErrInvalidVersion

ErrInvalidVersion identifies malformed tmux version tokens. It is matched by errors.Is for VersionError.

ErrInvalidWorkspace
attribute [source]
attribute [source]
ErrInvalidWorkspace

ErrInvalidWorkspace matches parse and validation failures, but not tmux command failures from Build .

Discussed in Go workspace builder behavior , Go workspace builder API

ErrMalformedComplexOption
attribute [source]
attribute [source]
ErrMalformedComplexOption

ErrMalformedComplexOption identifies an invalid entry in a parsed complex option.

ErrMalformedControlNotification
attribute [source]
attribute [source]
ErrMalformedControlNotification

ErrMalformedControlNotification identifies a structurally invalid control-mode notification.

ErrMalformedEnvironment
attribute [source]
attribute [source]
ErrMalformedEnvironment

ErrMalformedEnvironment identifies output that is not a tmux environment entry.

ErrMalformedFormatOutput
attribute [source]
attribute [source]
ErrMalformedFormatOutput

ErrMalformedFormatOutput identifies invalid escaped tmux format output. It is matched by errors.Is for FormatDecodeError .

ErrMalformedOptionOutput
attribute [source]
attribute [source]
ErrMalformedOptionOutput

ErrMalformedOptionOutput identifies a recognized option or hook record that cannot be decoded without ambiguity. It is matched by errors.Is for OptionDecodeError.

ErrMalformedSnapshot
attribute [source]
attribute [source]
ErrMalformedSnapshot

ErrMalformedSnapshot identifies invalid required fields in decoded rows. SnapshotDecodeError matches it through errors.Is.

ErrMissingSubcommand
attribute [source]
attribute [source]
ErrMissingSubcommand

ErrMissingSubcommand identifies an object command with no tmux subcommand.

ErrMissingTarget
attribute [source]
attribute [source]
ErrMissingTarget

ErrMissingTarget identifies an operation on a zero-value model identity.

ErrMultipleMatches
attribute [source]
attribute [source]
ErrMultipleMatches

ErrMultipleMatches identifies an ExactlyOne or ExactlyOneSeq query with more than one matching value. The queries stop when they find the second match. Cardinality errors can be checked with errors.Is.

Discussed in Filtering and querying, in practice

ErrNoMatch
attribute [source]
attribute [source]
ErrNoMatch

ErrNoMatch identifies an ExactlyOne or ExactlyOneSeq query with no matching value. Cardinality errors can be checked with errors.Is.

Discussed in Filtering and querying, in practice

ErrNotFound
attribute [source]
attribute [source]
ErrNotFound

ErrNotFound identifies an operation naming a tmux object that does not exist. A lookup that found nothing matches it, and so does a command tmux refused because the target it named was gone — the same condition reached from either direction. SnapshotLookupError and CommandError match it through errors.Is.

Only a claim of absence this package has not disproved matches. A lookup that reaches a replaced daemon, or whose diagnostic names an object it did not target, reports what it saw rather than an absence.

ErrNotInsideTmux
attribute [source]
attribute [source]
ErrNotInsideTmux

ErrNotInsideTmux identifies missing or malformed tmux discovery variables.

ErrOption
attribute [source]
attribute [source]
ErrOption

ErrOption identifies a failed high-level option or hook operation. It is matched by errors.Is for OptionError.

ErrOptionTarget
attribute [source]
attribute [source]
ErrOptionTarget

ErrOptionTarget identifies an option or hook operation whose target did not resolve, which is the failure an unknown name is most easily mistaken for. Classifying it discloses nothing that redaction protects: which kind of failure occurred is not one of the values or hook commands an option error withholds.

ErrOutcomeUnknown
attribute [source]
attribute [source]
ErrOutcomeUnknown

ErrOutcomeUnknown identifies a command whose write began but whose reply boundary was not observed. The operation may have changed tmux.

ErrOutcomeUnrecorded
attribute [source]
attribute [source]
ErrOutcomeUnrecorded

ErrOutcomeUnrecorded reports that a command's pane is dead while tmux has not recorded how the command ended, which it does by reaping the command's process. tmux is known to leave a pane in that state indefinitely, so this is reported rather than waited out, and rather than passed off as a zero exit status that would call a failed command successful.

ErrPlan
attribute [source]
attribute [source]
ErrPlan

ErrPlan identifies a plan that cannot run as recorded. It is matched by errors.Is for PlanError .

ErrPollCondition
attribute [source]
attribute [source]
ErrPollCondition

ErrPollCondition identifies a poll whose condition was nil. It is matched by errors.Is.

ErrSnapshotAmbiguous
attribute [source]
attribute [source]
ErrSnapshotAmbiguous

ErrSnapshotAmbiguous identifies a point lookup with multiple matching views. SnapshotLookupError matches it through errors.Is.

ErrUnknownColor
attribute [source]
attribute [source]
ErrUnknownColor

ErrUnknownColor identifies an unsupported tmux color mode. It is matched by errors.Is for ColorError .

ErrUnknownControlNotification
attribute [source]
attribute [source]
ErrUnknownControlNotification

ErrUnknownControlNotification identifies a well-framed notification kind outside the pinned control-mode vocabulary.

ErrUnknownOption
attribute [source]
attribute [source]
ErrUnknownOption

ErrUnknownOption identifies tmux's case-sensitive unknown-option diagnostic.

ErrVersionQuery
attribute [source]
attribute [source]
ErrVersionQuery

ErrVersionQuery identifies a tmux version probe that produced no usable version. It is matched by errors.Is for VersionQueryError.

ErrVersionTooLow
attribute [source]
attribute [source]
ErrVersionTooLow

ErrVersionTooLow identifies a tmux version below a required feature level. It is matched by errors.Is for VersionTooLowError.

Errors — Server 1 type, 3 functions and constants
ServerCommandRequestError 6 members

ServerCommandRequestError reports a locally rejected server command request field. Callers can use errors.Is with ErrInvalidServerCommandRequest or errors.As to inspect it. Value is redacted only when that field's validator requests redaction.

ErrInvalidServer
attribute [source]
attribute [source]
ErrInvalidServer

ErrInvalidServer identifies an operation on an uninitialized Server .

ErrInvalidServerOptions
attribute [source]
attribute [source]
ErrInvalidServerOptions

ErrInvalidServerOptions identifies a value that fails ServerOptions validation. Executable lookup and working-directory failures retain their own error identities.

ErrNoServer
attribute [source]
attribute [source]
ErrNoServer

ErrNoServer identifies a command that no tmux server answered. A CommandError may match both ErrNoServer and ErrCommand . tmux cannot reliably distinguish an absent or unreachable server from one that exited during the command.

Errors — Session 1 function or constant
ErrSessionExists
attribute [source]
attribute [source]
ErrSessionExists

ErrSessionExists identifies a named session that was not replaced.

Errors — Pane 1 function or constant
ErrPaneObservationLost
attribute [source]
attribute [source]
ErrPaneObservationLost

ErrPaneObservationLost identifies a pane observation whose control client can no longer receive every byte after its baseline. Stream failures that wrap it also preserve their underlying cause.

Constants and enums 28 types, 74 functions and constants
ColorMode 0 members

ColorMode selects a tmux color-capability override for ServerOptions .

CommandResult 5 members

CommandResult contains one completed tmux invocation. Server.Cmd returns it even when tmux exits nonzero. Library operations clone its slices before returning it, so the caller owns Command, Stdout, RawStdout, and Stderr.

TerminalOverrideValueKind 0 members

TerminalOverrideValueKind identifies one closed terminal capability value form.

ConnectionOptions 1 members

ConnectionOptions configures the control-mode lanes owned by a Connection .

ControlCommandResult 6 members

ControlCommandResult is one completed control-mode command frame. A failed tmux command remains result data through Failed; local, protocol, transport, and context failures are returned separately by Connection.Call , ControlClient.Cmd , and ControlClient.Call . All slices are owned by the caller.

SetEnvironmentOptions 2 members

SetEnvironmentOptions controls tmux's value expansion and visibility flags. Its zero value stores Value literally and exposes it to child processes.

SetHooksOptions 1 members

SetHooksOptions controls a bulk hook replacement. Its zero value preserves existing indices before applying the supplied sparse values.

SetHooksResult 2 members

SetHooksResult reports only side effects confirmed before return.

NotificationOptions 2 members

NotificationOptions configures which notifications a stream receives. The zero value retains notifications other than pane output.

ActivityAction 2 members

ActivityAction is a typed value for the "activity-action" tmux option. Its zero value is invalid.

BellAction 2 members

BellAction is a typed value for the "bell-action" tmux option. Its zero value is invalid.

ClockModeStyle 2 members

ClockModeStyle is a typed value for the "clock-mode-style" tmux option. Its zero value is invalid.

CursorStyle 2 members

CursorStyle is a typed value for the "cursor-style" tmux option. Its zero value is invalid.

PromptCommandCursorStyle 2 members

PromptCommandCursorStyle is a typed value for the "prompt-command-cursor-style" tmux option. Its zero value is invalid.

PromptCursorStyle 2 members

PromptCursorStyle is a typed value for the "prompt-cursor-style" tmux option. Its zero value is invalid.

SilenceAction 2 members

SilenceAction is a typed value for the "silence-action" tmux option. Its zero value is invalid.

ControlNotificationKind 1 members

ControlNotificationKind identifies a tmux control-mode notification record. Its zero value is unknown and is not emitted by tmux. ParseControlNotification returns known values for the pinned wire vocabulary and rejects unknown notification records.

SetOptionOptions 3 members

SetOptionOptions controls set-option mutation flags. Its zero value sends no optional mutation flags.

UnsetOptionOptions 2 members

UnsetOptionOptions controls set-option unset behavior. Its zero value unsets only the selected option.

SetArrayResult 2 members

SetArrayResult reports confirmed progress from a typed sparse-array replacement. AppliedIndices is caller-owned and is non-nil whenever mutation was attempted.

PlanResult 3 members

PlanResult reports what running a Plan did, one entry per recorded operation, in the order they were recorded.

OpResult 5 members

OpResult is what one operation in a Plan produced.

LoadBufferFromOptions 1 members

LoadBufferFromOptions configures streaming data into a tmux paste buffer. Its zero value lets tmux allocate a buffer; nil Name selects that allocation and a pointer to an empty name is explicit.

SaveBufferToOptions 1 members

SaveBufferToOptions configures streaming a tmux paste buffer's contents out. Its zero value selects tmux's most-recent buffer; a pointer to an empty name is explicit.

WaitForMode 0 members

WaitForMode selects one wait-for operation. The zero value waits until the channel is signaled.

RunOptions 4 members

RunOptions configures Session.Run and Session.Start . Its zero value runs the command in a window tmux names, in the session's default directory and environment, and removes that window once the command has finished.

RunResult 4 members

RunResult reports how a command finished and what its terminal showed.

WarningKind 0 members

WarningKind identifies one closed class of nonfatal library warning.

ActivityActionAny : ActivityAction
constant [source]
constant [source]
ActivityActionAny

ActivityActionAny selects "any".

ActivityActionCurrent : ActivityAction
constant [source]
constant [source]
ActivityActionCurrent

ActivityActionCurrent selects "current".

ActivityActionNone : ActivityAction
constant [source]
constant [source]
ActivityActionNone

ActivityActionNone selects "none".

ActivityActionOther : ActivityAction
constant [source]
constant [source]
ActivityActionOther

ActivityActionOther selects "other".

BellActionAny : BellAction
constant [source]
constant [source]
BellActionAny

BellActionAny selects "any".

BellActionCurrent : BellAction
constant [source]
constant [source]
BellActionCurrent

BellActionCurrent selects "current".

BellActionNone : BellAction
constant [source]
constant [source]
BellActionNone

BellActionNone selects "none".

BellActionOther : BellAction
constant [source]
constant [source]
BellActionOther

BellActionOther selects "other".

ClockModeStyle12 : ClockModeStyle
constant [source]
constant [source]
ClockModeStyle12

ClockModeStyle12 selects "12".

ClockModeStyle12WithSeconds : ClockModeStyle
constant [source]
constant [source]
ClockModeStyle12WithSeconds

ClockModeStyle12WithSeconds selects "12-with-seconds".

ClockModeStyle24 : ClockModeStyle
constant [source]
constant [source]
ClockModeStyle24

ClockModeStyle24 selects "24".

ClockModeStyle24WithSeconds : ClockModeStyle
constant [source]
constant [source]
ClockModeStyle24WithSeconds

ClockModeStyle24WithSeconds selects "24-with-seconds".

Color256 : ColorMode
constant [source]
constant [source]
Color256

Color256 requests tmux's 256-color capability mode.

Color88 : ColorMode
constant [source]
constant [source]
Color88

Color88 requests tmux's 88-color capability mode.

ColorDefault : ColorMode
constant [source]
constant [source]
ColorDefault

ColorDefault preserves tmux's detected color capability.

ControlNotificationClientDetached : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationClientDetached

ControlNotificationClientDetached identifies the %client-detached notification, available since tmux 3.2a. Its wire grammar is %client-detached <client>. ParseControlNotification returns its arguments as client tail.

ControlNotificationClientSessionChanged : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationClientSessionChanged

ControlNotificationClientSessionChanged identifies the %client-session-changed notification, available since tmux 3.2a. Its wire grammar is %client-session-changed <client> <session ID> <session name>. ParseControlNotification returns its arguments as client, session ID, session name tail.

ControlNotificationConfigError : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationConfigError

ControlNotificationConfigError identifies the %config-error notification, available since tmux 3.4. Its wire grammar is %config-error <text>. ParseControlNotification returns its arguments as text tail.

ControlNotificationContinue : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationContinue

ControlNotificationContinue identifies the %continue notification, available since tmux 3.2a. Its wire grammar is %continue <pane ID>. ParseControlNotification returns its arguments as pane ID.

ControlNotificationExit : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationExit

ControlNotificationExit identifies the %exit notification, available since tmux 3.2a. Its wire grammar is %exit or %exit <reason>. ParseControlNotification returns its arguments as reason tail.

ControlNotificationExtendedOutput : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationExtendedOutput

ControlNotificationExtendedOutput identifies the %extended-output notification, available since tmux 3.2a. Its wire grammar is %extended-output <pane ID> <age> { zero or more <reserved argument> } : <data>. ParseControlNotification returns its arguments as the prefix arguments, then zero or more reserved arguments, then the data tail; the prefix arguments are pane ID, age. Its tail may be empty.

ControlNotificationLayoutChange : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationLayoutChange

ControlNotificationLayoutChange identifies the %layout-change notification, available since tmux 3.2a. Its wire grammar is %layout-change <window ID> <layout> <visible layout> <flags>. ParseControlNotification returns its arguments as window ID, layout, visible layout, flags tail. Its tail may be empty.

ControlNotificationMessage : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationMessage

ControlNotificationMessage identifies the %message notification, available since tmux 3.4. Its wire grammar is %message <text>. ParseControlNotification returns its arguments as text tail. Its tail may be empty.

ControlNotificationOutput : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationOutput

ControlNotificationOutput identifies the %output notification, available since tmux 3.2a. Its wire grammar is %output <pane ID> <data>. ParseControlNotification returns its arguments as pane ID, data tail. Its tail may be empty.

ControlNotificationPaneModeChanged : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationPaneModeChanged

ControlNotificationPaneModeChanged identifies the %pane-mode-changed notification, available since tmux 3.2a. Its wire grammar is %pane-mode-changed <pane ID>. ParseControlNotification returns its arguments as pane ID.

ControlNotificationPasteBufferChanged : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationPasteBufferChanged

ControlNotificationPasteBufferChanged identifies the %paste-buffer-changed notification, available since tmux 3.4. Its wire grammar is %paste-buffer-changed <name>. ParseControlNotification returns its arguments as name tail.

ControlNotificationPasteBufferDeleted : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationPasteBufferDeleted

ControlNotificationPasteBufferDeleted identifies the %paste-buffer-deleted notification, available since tmux 3.4. Its wire grammar is %paste-buffer-deleted <name>. ParseControlNotification returns its arguments as name tail.

ControlNotificationPause : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationPause

ControlNotificationPause identifies the %pause notification, available since tmux 3.2a. Its wire grammar is %pause <pane ID>. ParseControlNotification returns its arguments as pane ID.

ControlNotificationSessionChanged : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationSessionChanged

ControlNotificationSessionChanged identifies the %session-changed notification, available since tmux 3.2a. Its wire grammar is %session-changed <session ID> <session name>. ParseControlNotification returns its arguments as session ID, session name tail.

ControlNotificationSessionRenamed : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationSessionRenamed

ControlNotificationSessionRenamed identifies the %session-renamed notification, available since tmux 3.2a. Its wire grammar is %session-renamed <session ID> <session name>. ParseControlNotification returns its arguments as session ID, session name tail.

ControlNotificationSessionsChanged : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationSessionsChanged

ControlNotificationSessionsChanged identifies the %sessions-changed notification, available since tmux 3.2a. Its wire grammar is %sessions-changed. ParseControlNotification returns its arguments as no arguments.

ControlNotificationSessionWindowChanged : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationSessionWindowChanged

ControlNotificationSessionWindowChanged identifies the %session-window-changed notification, available since tmux 3.2a. Its wire grammar is %session-window-changed <session ID> <window ID>. ParseControlNotification returns its arguments as session ID, window ID.

ControlNotificationSubscriptionChanged : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationSubscriptionChanged

ControlNotificationSubscriptionChanged identifies the %subscription-changed notification, available since tmux 3.2a. Its wire grammar is %subscription-changed <name> <session ID> <window ID> <window index> <pane ID> { zero or more <reserved argument> } : <value>. ParseControlNotification returns its arguments as the prefix arguments, then zero or more reserved arguments, then the value tail; the prefix arguments are name, session ID, window ID, window index, pane ID. Its tail may be empty.

ControlNotificationUnlinkedWindowAdd : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationUnlinkedWindowAdd

ControlNotificationUnlinkedWindowAdd identifies the %unlinked-window-add notification, available since tmux 3.2a. Its wire grammar is %unlinked-window-add <window ID>. ParseControlNotification returns its arguments as window ID.

ControlNotificationUnlinkedWindowClose : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationUnlinkedWindowClose

ControlNotificationUnlinkedWindowClose identifies the %unlinked-window-close notification, available since tmux 3.2a. Its wire grammar is %unlinked-window-close <window ID>. ParseControlNotification returns its arguments as window ID.

ControlNotificationUnlinkedWindowRenamed : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationUnlinkedWindowRenamed

ControlNotificationUnlinkedWindowRenamed identifies the %unlinked-window-renamed notification, available since tmux 3.2a. Its wire grammar is %unlinked-window-renamed <window ID> <name>. ParseControlNotification returns its arguments as window ID, name tail.

ControlNotificationWindowAdd : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationWindowAdd

ControlNotificationWindowAdd identifies the %window-add notification, available since tmux 3.2a. Its wire grammar is %window-add <window ID>. ParseControlNotification returns its arguments as window ID.

ControlNotificationWindowClose : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationWindowClose

ControlNotificationWindowClose identifies the %window-close notification, available since tmux 3.2a. Its wire grammar is %window-close <window ID>. ParseControlNotification returns its arguments as window ID.

ControlNotificationWindowPaneChanged : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationWindowPaneChanged

ControlNotificationWindowPaneChanged identifies the %window-pane-changed notification, available since tmux 3.2a. Its wire grammar is %window-pane-changed <window ID> <pane ID>. ParseControlNotification returns its arguments as window ID, pane ID.

ControlNotificationWindowRenamed : ControlNotificationKind
constant [source]
constant [source]
ControlNotificationWindowRenamed

ControlNotificationWindowRenamed identifies the %window-renamed notification, available since tmux 3.2a. Its wire grammar is %window-renamed <window ID> <name>. ParseControlNotification returns its arguments as window ID, name tail.

CursorStyleBar : CursorStyle
constant [source]
constant [source]
CursorStyleBar

CursorStyleBar selects "bar".

CursorStyleBlinkingBar : CursorStyle
constant [source]
constant [source]
CursorStyleBlinkingBar

CursorStyleBlinkingBar selects "blinking-bar".

CursorStyleBlinkingBlock : CursorStyle
constant [source]
constant [source]
CursorStyleBlinkingBlock

CursorStyleBlinkingBlock selects "blinking-block".

CursorStyleBlinkingUnderline : CursorStyle
constant [source]
constant [source]
CursorStyleBlinkingUnderline

CursorStyleBlinkingUnderline selects "blinking-underline".

CursorStyleBlock : CursorStyle
constant [source]
constant [source]
CursorStyleBlock

CursorStyleBlock selects "block".

CursorStyleDefault : CursorStyle
constant [source]
constant [source]
CursorStyleDefault

CursorStyleDefault selects "default".

CursorStyleUnderline : CursorStyle
constant [source]
constant [source]
CursorStyleUnderline

CursorStyleUnderline selects "underline".

PromptCommandCursorStyleBar : PromptCommandCursorStyle
constant [source]
constant [source]
PromptCommandCursorStyleBar

PromptCommandCursorStyleBar selects "bar".

PromptCommandCursorStyleBlinkingBar : PromptCommandCursorStyle
constant [source]
constant [source]
PromptCommandCursorStyleBlinkingBar

PromptCommandCursorStyleBlinkingBar selects "blinking-bar".

PromptCommandCursorStyleBlinkingBlock : PromptCommandCursorStyle
constant [source]
constant [source]
PromptCommandCursorStyleBlinkingBlock

PromptCommandCursorStyleBlinkingBlock selects "blinking-block".

PromptCommandCursorStyleBlinkingUnderline : PromptCommandCursorStyle
constant [source]
constant [source]
PromptCommandCursorStyleBlinkingUnderline

PromptCommandCursorStyleBlinkingUnderline selects "blinking-underline".

PromptCommandCursorStyleBlock : PromptCommandCursorStyle
constant [source]
constant [source]
PromptCommandCursorStyleBlock

PromptCommandCursorStyleBlock selects "block".

PromptCommandCursorStyleDefault : PromptCommandCursorStyle
constant [source]
constant [source]
PromptCommandCursorStyleDefault

PromptCommandCursorStyleDefault selects "default".

PromptCommandCursorStyleUnderline : PromptCommandCursorStyle
constant [source]
constant [source]
PromptCommandCursorStyleUnderline

PromptCommandCursorStyleUnderline selects "underline".

PromptCursorStyleBar : PromptCursorStyle
constant [source]
constant [source]
PromptCursorStyleBar

PromptCursorStyleBar selects "bar".

PromptCursorStyleBlinkingBar : PromptCursorStyle
constant [source]
constant [source]
PromptCursorStyleBlinkingBar

PromptCursorStyleBlinkingBar selects "blinking-bar".

PromptCursorStyleBlinkingBlock : PromptCursorStyle
constant [source]
constant [source]
PromptCursorStyleBlinkingBlock

PromptCursorStyleBlinkingBlock selects "blinking-block".

PromptCursorStyleBlinkingUnderline : PromptCursorStyle
constant [source]
constant [source]
PromptCursorStyleBlinkingUnderline

PromptCursorStyleBlinkingUnderline selects "blinking-underline".

PromptCursorStyleBlock : PromptCursorStyle
constant [source]
constant [source]
PromptCursorStyleBlock

PromptCursorStyleBlock selects "block".

PromptCursorStyleDefault : PromptCursorStyle
constant [source]
constant [source]
PromptCursorStyleDefault

PromptCursorStyleDefault selects "default".

PromptCursorStyleUnderline : PromptCursorStyle
constant [source]
constant [source]
PromptCursorStyleUnderline

PromptCursorStyleUnderline selects "underline".

SilenceActionAny : SilenceAction
constant [source]
constant [source]
SilenceActionAny

SilenceActionAny selects "any".

SilenceActionCurrent : SilenceAction
constant [source]
constant [source]
SilenceActionCurrent

SilenceActionCurrent selects "current".

SilenceActionNone : SilenceAction
constant [source]
constant [source]
SilenceActionNone

SilenceActionNone selects "none".

SilenceActionOther : SilenceAction
constant [source]
constant [source]
SilenceActionOther

SilenceActionOther selects "other".

TerminalOverrideValueFlag : TerminalOverrideValueKind
constant [source]
constant [source]
TerminalOverrideValueFlag

TerminalOverrideValueFlag identifies a capability without an assigned value.

TerminalOverrideValueInteger : TerminalOverrideValueKind
constant [source]
constant [source]
TerminalOverrideValueInteger

TerminalOverrideValueInteger identifies an unsigned decimal integer.

TerminalOverrideValueText : TerminalOverrideValueKind
constant [source]
constant [source]
TerminalOverrideValueText

TerminalOverrideValueText identifies an assigned non-integer string.

WaitForModeLock : WaitForMode
constant [source]
constant [source]
WaitForModeLock

WaitForModeLock acquires Channel's tmux mutex, queuing behind another locker if it is already held.

A cancelled or timed-out ctx while queued costs Channel one unlock: tmux hands the mutex to the next queued client whether or not it is still there, and the one that has gone cannot pass it on (cmd-wait-for.c cmd_wait_for_unlock). Unlocking again hands it to the next real locker, so a channel is not lost, but a program that abandons lock waits and counts its unlocks will deadlock on its own arithmetic.

WaitForModeSignal : WaitForMode
constant [source]
constant [source]
WaitForModeSignal

WaitForModeSignal signals Channel and wakes waiters.

WaitForModeUnlock : WaitForMode
constant [source]
constant [source]
WaitForModeUnlock

WaitForModeUnlock releases Channel's tmux mutex.

WaitForModeWait : WaitForMode
constant [source]
constant [source]
WaitForModeWait

WaitForModeWait waits until another client signals Channel.

WarningCommandStderr : WarningKind
constant [source]
constant [source]
WarningCommandStderr

WarningCommandStderr reports stderr from a completed command whose Python API treats the diagnostic as nonfatal.

WarningUnsupportedFeature : WarningKind
constant [source]
constant [source]
WarningUnsupportedFeature

WarningUnsupportedFeature reports a requested feature omitted because the connected tmux binary is too old.

Constants and enums — Server 1 type
ServerOptions 9 members

ServerOptions configures a Server without starting tmux. NewServer snapshots the effective environment, working directory, and executable; callers retain ownership of every supplied value.

Constants and enums — Session 1 type
AttachSessionOptions 9 members

AttachSessionOptions configures terminal ownership and attach behavior shared by server- and session-scoped attachment. Nil StartDirectory omits its flag and a nonnil empty string is explicit; ClientFlags is copied. The Stdin, Stdout, and Stderr pointers are retained for the attach call and are never owned or closed by this package.

Constants and enums — Window 1 type
WindowSwapResult 2 members

WindowSwapResult contains both original stable window identities in their post-swap exact winlink views. Its zero value contains no usable endpoints.

Constants and enums — Pane 3 types, 6 functions and constants
PaneSwapResult 2 members

PaneSwapResult contains original stable pane identities in their post-swap exact linked-pane views. Its zero value contains no usable endpoints. Target is zero for a directional swap because tmux does not report the adjacent pane identity.

PaneMarkMode 0 members

PaneMarkMode changes tmux's server-wide marked pane on tmux 3.2a or later. Its zero value leaves the mark unchanged.

PaneInputMode 0 members

PaneInputMode changes whether a pane accepts input on tmux 3.2a or later. Its zero value leaves input state unchanged.

PaneInputDisable : PaneInputMode
constant [source]
constant [source]
PaneInputDisable

PaneInputDisable disables input without selecting the target pane.

PaneInputEnable : PaneInputMode
constant [source]
constant [source]
PaneInputEnable

PaneInputEnable enables input without selecting the target pane.

PaneInputUnchanged : PaneInputMode
constant [source]
constant [source]
PaneInputUnchanged

PaneInputUnchanged leaves the target pane's input state unchanged.

PaneMarkClear : PaneMarkMode
constant [source]
constant [source]
PaneMarkClear

PaneMarkClear clears the server-wide marked pane without selecting the target.

PaneMarkSet : PaneMarkMode
constant [source]
constant [source]
PaneMarkSet

PaneMarkSet makes the target the server-wide marked pane without selecting it.

PaneMarkUnchanged : PaneMarkMode
constant [source]
constant [source]
PaneMarkUnchanged

PaneMarkUnchanged leaves the server-wide marked pane unchanged.

Testing utilities 4 types, 21 functions and constants
ControlMode 7 members

ControlMode is an attached tmux control client for real-tmux tests. It owns one stdout reader and a temporary-file spool, which preserves unread protocol output until ControlMode.Close releases it. Instances come from NewControlMode ; do not construct them directly or read concurrently.

ServerOptions 5 members

ServerOptions configures a harness-owned tmux.Server . All inputs are copied before filesystem or process operations, so callers retain ownership.

PTYProcess 6 members

PTYProcess is a test subprocess that owns an isolated controlling terminal and a memory-backed transcript. It comes from StartPTYProcess . Output may be read concurrently through PTYProcess.Output ; writes are serialized.

ScriptedCommand 4 members

ScriptedCommand is one answer a scripted tmux gives. The first matching entry wins, and an invocation nothing matches exits 1 saying so.

MaximumTestedVersion
constant [source]
constant [source]
MaximumTestedVersion

MaximumTestedVersion is the newest numbered tmux feature level covered by this package's tests. The matrix also runs 3.8-rc, which is a release candidate rather than a numbered feature level, so it does not raise this.

ShellPrompt
constant [source]
constant [source]
ShellPrompt

ShellPrompt is the prompt drawn when ServerOptions.FixedShell is enabled.

SuiteRootTagVariable
constant [source]
constant [source]
SuiteRootTagVariable

SuiteRootTagVariable names the environment variable that tags a suite's temporary root. go test runs packages in parallel and every suite among them creates a root beside the others, so a test spawning a child suite sets this to tell its child's root from theirs.

TemporaryNamePrefix
constant [source]
constant [source]
TemporaryNamePrefix

TemporaryNamePrefix prefixes names generated by NewSession and NewWindow .

Main ( m : *testing.M ) → int
function [source]
function [source]
Main

Main runs the one-call package lifecycle for tmuxtest. It prepares short temporary paths, redirects suiteEnvironment into them, runs m, cleans registered servers, restores the environment, and returns the final status. TestMain should return its result through os.Exit.

NewControlMode ( ctx : context.Context , t : testing.TB , server : tmux.Server , session : tmux.Session ) → *ControlMode
function [source]
function [source]
NewControlMode

NewControlMode starts a ControlMode attached to session and registers cleanup with t. It requires an explicitly configured process environment and validates that session belongs to server. The client pins the server's frozen effective socket path. Validation or startup failures call testing.TB.Fatal. ctx bounds startup and registration only, not the returned client's lifetime.

NewServer ( ctx : context.Context , t : testing.TB ) → tmux.Server
function [source]
function [source]
NewServer

NewServer starts an isolated tmux.Server with a session named "work". Startup uses ctx and the harness timeout, whichever ends first. It registers bounded cleanup with t; setup failures call testing.TB.Fatal. The context does not govern later server cleanup or daemon lifetime.

Discussed in Testing with libtmux

NewServerWithOptions ( ctx : context.Context , t : testing.TB , options : ServerOptions ) → tmux.Server
function [source]
function [source]
NewServerWithOptions

NewServerWithOptions prepares an isolated harness-owned tmux.Server from options. Initial startup uses ctx and the harness timeout, whichever ends first. The daemon starts only when ServerOptions.InitialSession is non-nil or a later tmux command starts it. It registers bounded cleanup with t; setup failures call testing.TB.Fatal. The context does not govern later cleanup or daemon lifetime.

NewSession ( ctx : context.Context , t : testing.TB , server : tmux.Server , request : tmux.NewSessionRequest ) → tmux.Session
function [source]
function [source]
NewSession

NewSession creates a test-owned tmux.Session and registers cleanup against its stable ID. An empty tmux.NewSessionRequest.Name receives a collision-checked temporary name. The request and referenced values are copied before tmux is called, and setup failures call testing.TB.Fatal. Cleanup belongs to t rather than ctx and continues to target the session if it is renamed.

NewWindow ( ctx : context.Context , t : testing.TB , session : tmux.Session , request : tmux.NewWindowRequest ) → tmux.Window
function [source]
function [source]
NewWindow

NewWindow creates a test-owned tmux.Window and registers cleanup against its stable ID. A nil tmux.NewWindowRequest.Name receives a collision-checked temporary name; an empty non-nil name remains explicit. The request and referenced values are copied before tmux is called, and setup failures call testing.TB.Fatal. Cleanup belongs to t rather than ctx and follows the window if it is moved.

RunInPane ( ctx : context.Context , t : testing.TB , command : string ) → tmux.Pane
function [source]
function [source]
RunInPane

RunInPane creates an isolated pane, waits for its startup-file-free POSIX shell, and submits command with Type . It does not wait for command to start or finish. Resources belong to t; setup failures call testing.TB.Fatal. Use NewServerWithOptions for custom topology or configuration.

Screen ( ctx : context.Context , t : testing.TB , pane : tmux.Pane ) → []string
function [source]
function [source]
Screen

Screen returns the pane's visible lines, top to bottom, with tmux's trailing blank lines removed.

Scrolled-out output is excluded. Use tmux.Pane.Capture with tmux.CaptureBoundary to read scrollback.

Read failures call testing.TB.Fatal.

ScriptedTmux ( t : testing.TB , script : ScriptedCommand ) → string
function [source]
function [source]
ScriptedTmux

ScriptedTmux writes an executable that answers tmux invocations from script and returns its absolute path, for tmux.ServerOptions.Binary . It is how a test drives code that uses this package without a tmux to drive:

server, err := tmux.NewServer(tmux.ServerOptions{ Binary: tmuxtest.ScriptedTmux(t, tmuxtest.ScriptedCommand{Contains: []string{"-V"}, Stdout: "tmux 3.7\n"}, tmuxtest.ScriptedCommand{ Contains: []string{"kill-pane"}, Stderr: "can't find pane: %7\n", ExitCode: 1, }, ), })

The executable is removed with the test. It answers commands only: opening a control connection or a notification stream speaks tmux's control protocol, which a script cannot, so code that opens one needs NewServer and a real tmux.

StartPTYProcess ( ctx : context.Context , t : testing.TB , binary : string , arguments : []string , environment : []string ) → *PTYProcess
function [source]
function [source]
StartPTYProcess

StartPTYProcess starts binary with a harness-owned controlling terminal and registers bounded cleanup with t. Its start context owns the child lifetime: canceling ctx terminates the child. Arguments and environment are copied. A nil environment inherits the current process environment; a non-nil empty environment remains empty. binary runs directly without a shell. The PTY backend is supported on Linux only; unsupported platforms call testing.TB.Fatal. Setup failures also call testing.TB.Fatal.

Type ( ctx : context.Context , t : testing.TB , pane : tmux.Pane , command : string )
function [source]
function [source]
Type

Type sends command to the pane and submits it, as a person at the keyboard would.

command is sent literally. Type returns when tmux accepts the keys, before the shell finishes; follow it with a wait when completion matters.

TypeAndWait ( ctx : context.Context , t : testing.TB , pane : tmux.Pane , command : string )
function [source]
function [source]
TypeAndWait

TypeAndWait sends command to the pane and blocks until it has finished.

It appends and waits for a unique marker whether the command succeeds or fails. It does not return the command's exit status.

WaitFor ( ctx : context.Context , interval : time.Duration , condition : func(context.Context) (bool, error) ) → error
function [source]
function [source]
WaitFor

WaitFor checks condition serially and immediately, then after each interval, until it succeeds, returns an error, or ctx ends. It validates interval, condition, and ctx in that order: interval must be positive, condition must be non-nil, and an already-ended context prevents every check. Condition errors and context errors are returned unchanged. A running condition receives ctx and must observe it itself; WaitFor cannot interrupt the condition.

Discussed in Waiting and retrying

WaitForLine ( ctx : context.Context , t : testing.TB , pane : tmux.Pane , line : string )
function [source]
function [source]
WaitForLine

WaitForLine blocks until some line of the pane's screen is exactly line.

A pane that never shows line fails the test with the screen it last read.

WaitForScreen ( ctx : context.Context , t : testing.TB , pane : tmux.Pane , want : string , match : func(screen []string) bool )
function [source]
function [source]
WaitForScreen

WaitForScreen blocks until the pane's screen satisfies match.

want is the noun phrase used in the failure message.

match receives a newly read screen and must not retain it.

WaitForShellReady ( ctx : context.Context , t : testing.TB , pane : tmux.Pane )
function [source]
function [source]
WaitForShellReady

WaitForShellReady blocks until the pane first shows output. With ServerOptions.FixedShell , that expected first output is the harness prompt and serves as readiness evidence; custom shell startup output may not.

RunInPane calls it, and a test building its own pane should too.

Discussed in Sending keys

WaitForText ( ctx : context.Context , t : testing.TB , pane : tmux.Pane , text : string )
function [source]
function [source]
WaitForText

WaitForText blocks until some line of the pane's screen contains text.

A pane that never shows text fails the test with the screen it last read.

Discussed in Capture pane output

Other 10 types, 14 functions and constants
TreeSortOrder 0 members

TreeSortOrder selects one initial tmux choose-tree ordering. Its zero value leaves tmux's configured ordering unchanged.

PromptType 0 members

PromptType selects one closed tmux prompt-history class. The zero value selects all prompt types.

MenuItem 3 members

MenuItem is one display-menu entry. Its zero value is a separator. A named item always contributes its name, key, and command to tmux, including empty key or command strings.

SocketSelection 2 members

SocketSelection describes the Unix filesystem endpoint selected by a Server . It does not report whether a server is listening there or whether tmux would accept the named-socket directory's ownership and permissions.

SparseEntry 2 members

SparseEntry is one indexed SparseArray value.

SparseArray 8 members

SparseArray stores values at sorted, nonnegative indices. Its zero value is an empty array. Constructors and functional updates own their entry slices; copies of reference-bearing T values remain shallow.

UnsupportedPolicy 1 members

UnsupportedPolicy selects what a request does when it needs an optional tmux capability the running server does not have.

Warning 7 members

Warning describes one nonfatal compatibility decision delivered to a WarningHandler .

WarningHandler 0 members

WarningHandler receives warnings synchronously on the caller goroutine:

Bool 1 members

Bool accepts YAML booleans and tmuxp's quoted spellings. It is exported so callers can construct optional *Bool fields.

DegradeUnsupported : UnsupportedPolicy
constant [source]
constant [source]
DegradeUnsupported

DegradeUnsupported omits the capability, runs the reduced command, and reports the decision to ServerOptions.WarningHandler as a WarningUnsupportedFeature.

FailUnsupported : UnsupportedPolicy
constant [source]
constant [source]
FailUnsupported

FailUnsupported refuses a request naming a capability the running tmux does not have, with a VersionTooLowError naming the subcommand and the capability. It is the zero value.

PromptTypeAll : PromptType
constant [source]
constant [source]
PromptTypeAll

PromptTypeAll selects every prompt-history class and omits -T.

PromptTypeCommand : PromptType
constant [source]
constant [source]
PromptTypeCommand

PromptTypeCommand selects command-prompt history.

PromptTypeSearch : PromptType
constant [source]
constant [source]
PromptTypeSearch

PromptTypeSearch selects search-prompt history.

PromptTypeTarget : PromptType
constant [source]
constant [source]
PromptTypeTarget

PromptTypeTarget selects target-prompt history.

PromptTypeWindowTarget : PromptType
constant [source]
constant [source]
PromptTypeWindowTarget

PromptTypeWindowTarget selects window-target-prompt history.

TreeSortDefault : TreeSortOrder
constant [source]
constant [source]
TreeSortDefault

TreeSortDefault leaves the configured choose-tree ordering unchanged.

TreeSortIndex : TreeSortOrder
constant [source]
constant [source]
TreeSortIndex

TreeSortIndex orders tree entries by index.

TreeSortName : TreeSortOrder
constant [source]
constant [source]
TreeSortName

TreeSortName orders tree entries by name.

TreeSortSize : TreeSortOrder
constant [source]
constant [source]
TreeSortSize

TreeSortSize orders tree entries by size.

TreeSortTime : TreeSortOrder
constant [source]
constant [source]
TreeSortTime

TreeSortTime orders tree entries by activity time.

NewSparseArray ( entries : SparseEntry[T] ) → (SparseArray[T], error)
function [source]
function [source]
NewSparseArray

NewSparseArray builds an array from entries, sorting them by index. It returns errors matching ErrInvalidSparseIndex or ErrDuplicateSparseIndex for negative, overflowing, or duplicate indices.

Poll ( ctx : context.Context , interval : time.Duration , condition : func(context.Context) (bool, error) ) → error
function [source]
function [source]
Poll

Poll checks condition immediately and then after each interval, until it reports true, returns an error, or ctx ends.

A condition receives ctx and must observe cancellation itself; Poll cannot interrupt one already running. Poll returns condition errors unchanged and ctx.Err when ctx ends first.

Poll is for a state tmux does not announce. Waiting for a pane to print something is not one: PaneObservation.WaitFor is woken by tmux as the pane writes, where a poll re-reads the screen on a guess and can match a shell's echo of what was typed. Server.WaitFor waits on tmux's separate wait-for channel.

By module 6 modules

Esc

Type to search.