On this page
Go API reference
2620 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.
By module 5 modules
- tmux 488
- tmuxq 6
- tmuxtest 22
- workspace 8
- Types 21
Server 2 types
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 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.
Session 4 types
SessionID is tmux's stable session identifier, including its $ sigil. The zero value is not a usable tmux target.
Session 129 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 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 is an immutable handle for global session options and hooks. Its zero value is invalid because it contains a zero Server .
Window 9 types
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 155 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 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 is an immutable handle for global window options and hooks. Its zero value is invalid because it contains a zero Server .
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 selects rotate-window's direction on tmux 3.2a or later. Its zero value uses tmux's default rotation.
WindowResizeDirection 0 membersWindowResizeDirection selects one directional resize operation on tmux 3.2a or later. Its zero value selects no directional adjustment.
Window 13 membersWindow is one window in a workspace.
Pane 14 types
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 membersPaneID 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 162 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 is a typed value for the "pane-border-indicators" tmux option. Its zero value is invalid.
PaneBorderLines 2 membersPaneBorderLines is a typed value for the "pane-border-lines" tmux option. Its zero value is invalid.
PaneBorderStatus 2 membersPaneBorderStatus is a typed value for the "pane-border-status" tmux option. Its zero value is invalid.
PaneScrollbars 2 membersPaneScrollbars is a typed value for the "pane-scrollbars" tmux option. Its zero value is invalid.
PaneScrollbarsPosition 2 membersPaneScrollbarsPosition 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 selects a directional Pane.Resize . Its zero value selects no directional adjustment.
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.
SwapPaneDirection selects an adjacent pane for swap-pane on tmux 3.2a or later. Its zero value selects no adjacent pane.
PaneSelectDirection 0 membersPaneSelectDirection selects a pane relative to the command target on tmux 3.2a or later. Its zero value selects no relative direction.
Pane 11 membersPane 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.
Client 3 types
ClientAttachment is one immutable view of a client's live attachment. Session, Window, and Pane return values from the same observational Snapshot.
ClientName 1 membersClientName is tmux's stable client name, normally its terminal path. The zero value is not a usable tmux target.
Client 34 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 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 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 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 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
AllowPassthrough is a typed value for the "allow-passthrough" tmux option. Its zero value is invalid.
CopyModeLineNumbers 2 membersCopyModeLineNumbers is a typed value for the "copy-mode-line-numbers" tmux option. Its zero value is invalid.
DestroyUnattached 2 membersDestroyUnattached is a typed value for the "destroy-unattached" tmux option. Its zero value is invalid.
DetachOnDestroy 2 membersDetachOnDestroy is a typed value for the "detach-on-destroy" tmux option. Its zero value is invalid.
ExtendedKeys 2 membersExtendedKeys is a typed value for the "extended-keys" tmux option. Its zero value is invalid.
GetClipboard 2 membersGetClipboard is a typed value for the "get-clipboard" tmux option. Its zero value is invalid.
MenuBorderLines 2 membersMenuBorderLines is a typed value for the "menu-border-lines" tmux option. Its zero value is invalid.
MessageLine 2 membersMessageLine is a typed value for the "message-line" tmux option. Its zero value is invalid.
ModeKeys 2 membersModeKeys is a typed value for the "mode-keys" tmux option. Its zero value is invalid.
PopupBorderLines 2 membersPopupBorderLines is a typed value for the "popup-border-lines" tmux option. Its zero value is invalid.
RemainOnExit 2 membersRemainOnExit is a typed value for the "remain-on-exit" tmux option. Its zero value is invalid.
SetClipboard 2 membersSetClipboard is a typed value for the "set-clipboard" tmux option. Its zero value is invalid.
Status 2 membersStatus is a typed value for the "status" tmux option. Its zero value is invalid.
StatusJustify 2 membersStatusJustify is a typed value for the "status-justify" tmux option. Its zero value is invalid.
StatusKeys 2 membersStatusKeys is a typed value for the "status-keys" tmux option. Its zero value is invalid.
StatusPosition 2 membersStatusPosition is a typed value for the "status-position" tmux option. Its zero value is invalid.
VisualActivity 2 membersVisualActivity is a typed value for the "visual-activity" tmux option. Its zero value is invalid.
VisualBell 2 membersVisualBell is a typed value for the "visual-bell" tmux option. Its zero value is invalid.
VisualSilence 2 membersVisualSilence is a typed value for the "visual-silence" tmux option. Its zero value is invalid.
OptionOrigin 1 membersOptionOrigin identifies where a present option value was resolved. The declared values form the complete set of valid origins.
OptionValue 2 membersOptionValue preserves option presence and resolution origin. Its zero value is absent. Copies of reference-bearing T values are shallow.
Keys and bindings 1 type
Environment 1 type
Terminal capabilities 7 types
TerminalFeature is one terminal pattern and its enabled features.
TerminalFeatures 3 membersTerminalFeatures 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 membersTerminalOverrideValue 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 membersTerminalCapability is one parsed terminal override capability.
TerminalOverride 3 membersTerminalOverride 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 membersTerminalOverrideEntry is one terminal pattern and its parsed capabilities.
TerminalOverrides 3 membersTerminalOverrides 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
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.
Commands 4 types
CommandAlias is one parsed command-alias entry.
CommandAliases 3 membersCommandAliases 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 membersConnection 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.
Command 5 membersCommand 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.
Control mode 4 types
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 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.
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 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.
Formats 2 types
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 membersExtendedKeysFormat is a typed value for the "extended-keys-format" tmux option. Its zero value is invalid.
Queries 7 types
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 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 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 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 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 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 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.
Snapshots 2 types
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 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.
Workspaces 6 types
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 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 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 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 reports what became of one operation in a plan.
Workspaces — Plans 3 types
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 membersPlanner groups a plan's operations into tmux invocations.
Workspace 12 membersWorkspace is one tmuxp-style session description.
Requests 28 types
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.
SendKeysRequest 11 membersSendKeysRequest configures tmux key input. Pointer values are copied before I/O and must not be mutated concurrently.
SendKeySequenceRequest 2 membersSendKeySequenceRequest 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 membersClearHistoryRequest configures pane history clearing. Its zero value clears scrollback without requesting hyperlink cleanup.
CopyModeRequest 6 membersCopyModeRequest 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 membersChooseTreeRequest 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 membersDisplayPopupRequest 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 membersPasteBufferRequest 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 selects one prompt-history class. A zero request selects every class.
SetBufferRequest 3 membersSetBufferRequest 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 membersSaveBufferRequest 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 membersLoadBufferRequest 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 membersListBuffersRequest 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 membersRunShellRequest 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 membersWaitForRequest configures a wait, signal, lock, or unlock operation. Its zero value waits on the required nonempty Channel.
IfShellRequest 5 membersIfShellRequest 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 membersSourceFileRequest 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 membersConfirmBeforeRequest 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 membersCommandPromptRequest 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 membersDisplayMenuRequest 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 membersBindKeyRequest 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 membersUnbindKeyRequest selects one key or an entire key table to unbind. Exactly one of Key and AllKeys must be set.
ListKeysRequest 2 membersListKeysRequest 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 membersListCommandsRequest optionally limits output to one tmux command or alias. Nil CommandName lists all commands; a pointer to an empty name is explicit.
ShowMessagesRequest 3 membersShowMessagesRequest selects the target and server information to print. Terminals and Jobs are independent and may both be enabled.
SelectLayoutRequest 4 membersSelectLayoutRequest 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 membersRespawnRequest 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.
Requests — Session 4 types
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 membersAttachSessionRequest selects a session name or tmux target pattern and configures a blocking terminal attachment. An empty Target lets tmux choose.
HasSessionRequest 2 membersHasSessionRequest 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 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 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 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 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 membersUnlinkWindowRequest 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 membersMoveWindowRequest 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 membersSwapWindowRequest 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 membersWindowSelectPaneRequest 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 membersRotateWindowRequest configures rotate-window. Its zero value uses tmux's default rotation; enum validation happens before execution.
ResizeWindowRequest 6 membersResizeWindowRequest 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 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 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 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 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 membersPipePaneRequest configures a pane pipe. Its flags may be combined. Command is copied before I/O and must not be mutated concurrently.
MovePaneRequest 7 membersMovePaneRequest 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 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 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 membersPaneSelectRequest 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 membersLastPaneRequest 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 configures refreshing one tmux client. Its zero value refreshes tmux's current client; a zero TargetClient omits -t.
DetachClientRequest 2 membersDetachClientRequest 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 membersDetachAllClientsRequest configures detaching every client except one. Its zero value keeps tmux's current client; nil fields omit their flags.
Errors 22 types
ColorError reports an unsupported color mode. It matches ErrUnknownColor through errors.Is; callers can recover Mode with errors.As.
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 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 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 reports a name that tmux cannot store.
EnvironmentValueError 2 membersEnvironmentValueError reports a value that cannot round-trip through show-environment. It intentionally does not retain or print the environment value.
EnvironmentDecodeError 4 membersEnvironmentDecodeError 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 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 reports a rejected typed option value without retaining or rendering that value. It matches ErrInvalidOptionValue and ErrOption.
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 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 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 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 reports the installed and required tmux feature levels. It matches ErrVersionTooLow through errors.Is; callers can recover its fields with errors.As.
SnapshotDecodeError identifies one malformed decoded list row. It matches ErrMalformedSnapshot through errors.Is; callers can recover its redacted location fields with errors.As.
SnapshotLookupError reports the cardinality of an unsuccessful point lookup. It matches ErrSnapshotNotFound or ErrSnapshotAmbiguous through errors.Is; callers can recover its target and count with errors.As.
TargetError reports a malformed stable identifier before command execution. It matches ErrInvalidTarget through errors.Is; callers can recover Object and Target with errors.As.
VersionError reports a tmux version token that cannot be parsed. It matches ErrInvalidVersion through errors.Is; callers can recover Token with errors.As.
Constants and enums 24 types
ColorMode selects a tmux color-capability override for ServerOptions .
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 identifies one closed terminal capability value form.
ConnectionOptions 1 members ConnectionOptions configures the control-mode lanes owned by a Connection .
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 controls tmux's value expansion and visibility flags. Its zero value stores Value literally and exposes it to child processes.
SetHooksOptions 1 membersSetHooksOptions controls a bulk hook replacement. Its zero value preserves existing indices before applying the supplied sparse values.
SetHooksResult 2 membersSetHooksResult reports only side effects confirmed before return.
NotificationOptions 2 membersNotificationOptions configures which notifications a stream receives. The zero value retains notifications other than pane output.
ActivityAction 2 membersActivityAction is a typed value for the "activity-action" tmux option. Its zero value is invalid.
BellAction 2 membersBellAction is a typed value for the "bell-action" tmux option. Its zero value is invalid.
ClockModeStyle 2 membersClockModeStyle is a typed value for the "clock-mode-style" tmux option. Its zero value is invalid.
CursorStyle 2 membersCursorStyle is a typed value for the "cursor-style" tmux option. Its zero value is invalid.
PromptCommandCursorStyle 2 membersPromptCommandCursorStyle is a typed value for the "prompt-command-cursor-style" tmux option. Its zero value is invalid.
PromptCursorStyle 2 membersPromptCursorStyle is a typed value for the "prompt-cursor-style" tmux option. Its zero value is invalid.
SilenceAction 2 membersSilenceAction 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 controls set-option mutation flags. Its zero value sends no optional mutation flags.
UnsetOptionOptions 2 membersUnsetOptionOptions controls set-option unset behavior. Its zero value unsets only the selected option.
SetArrayResult 2 membersSetArrayResult 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 is what one operation in a Plan produced.
WaitForMode selects one wait-for operation. The zero value waits until the channel is signaled.
WarningKind 0 membersWarningKind identifies one closed class of nonfatal library warning.
Constants and enums — Server 1 type
Constants and enums — Window 1 type
Constants and enums — Pane 3 types
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 membersPaneMarkMode changes tmux's server-wide marked pane on tmux 3.2a or later. Its zero value leaves the mark unchanged.
PaneInputMode 0 membersPaneInputMode changes whether a pane accepts input on tmux 3.2a or later. Its zero value leaves input state unchanged.
Testing utilities 3 types
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 configures a harness-owned tmux.Server . All inputs are copied before filesystem or process operations, so callers retain ownership.
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.
Other 10 types
TreeSortOrder selects one initial tmux choose-tree ordering. Its zero value leaves tmux's configured ordering unchanged.
PromptType 0 membersPromptType selects one closed tmux prompt-history class. The zero value selects all prompt types.
MenuItem 3 membersMenuItem 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 is one indexed SparseArray value.
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 membersUnsupportedPolicy 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 receives warnings synchronously on the caller goroutine:
Bool 1 membersBool accepts YAML booleans and tmuxp's quoted spellings. It is exported so callers can construct optional *Bool fields.
Functions and constants 0 types
- ActivityActionAny : ActivityAction
-
ActivityActionAny selects "any".
- ActivityActionCurrent : ActivityAction
-
ActivityActionCurrent selects "current".
- ActivityActionNone : ActivityAction
-
ActivityActionNone selects "none".
- ActivityActionOther : ActivityAction
-
ActivityActionOther selects "other".
- AllowPassthroughAll : AllowPassthrough
-
AllowPassthroughAll selects "all".
- AllowPassthroughOff : AllowPassthrough
-
AllowPassthroughOff selects "off".
- AllowPassthroughOn : AllowPassthrough
-
AllowPassthroughOn selects "on".
- BellActionAny : BellAction
-
BellActionAny selects "any".
- BellActionCurrent : BellAction
-
BellActionCurrent selects "current".
- BellActionNone : BellAction
-
BellActionNone selects "none".
- BellActionOther : BellAction
-
BellActionOther selects "other".
- CaptureBoundary : CapturePosition
-
CaptureBoundary selects the start of history when used as Start and the end of the visible pane when used as End.
- ClockModeStyle12 : ClockModeStyle
-
ClockModeStyle12 selects "12".
- ClockModeStyle12WithSeconds : ClockModeStyle
-
ClockModeStyle12WithSeconds selects "12-with-seconds".
- ClockModeStyle24 : ClockModeStyle
-
ClockModeStyle24 selects "24".
- ClockModeStyle24WithSeconds : ClockModeStyle
-
ClockModeStyle24WithSeconds selects "24-with-seconds".
-
Color256 requests tmux's 256-color capability mode.
-
Color88 requests tmux's 88-color capability mode.
-
ColorDefault preserves tmux's detected color capability.
- ControlNotificationClientDetached : ControlNotificationKind
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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.
- CopyModeLineNumbersAbsolute : CopyModeLineNumbers
-
CopyModeLineNumbersAbsolute selects "absolute".
- CopyModeLineNumbersDefault : CopyModeLineNumbers
-
CopyModeLineNumbersDefault selects "default".
- CopyModeLineNumbersHybrid : CopyModeLineNumbers
-
CopyModeLineNumbersHybrid selects "hybrid".
- CopyModeLineNumbersOff : CopyModeLineNumbers
-
CopyModeLineNumbersOff selects "off".
- CopyModeLineNumbersRelative : CopyModeLineNumbers
-
CopyModeLineNumbersRelative selects "relative".
- CursorStyleBar : CursorStyle
-
CursorStyleBar selects "bar".
- CursorStyleBlinkingBar : CursorStyle
-
CursorStyleBlinkingBar selects "blinking-bar".
- CursorStyleBlinkingBlock : CursorStyle
-
CursorStyleBlinkingBlock selects "blinking-block".
- CursorStyleBlinkingUnderline : CursorStyle
-
CursorStyleBlinkingUnderline selects "blinking-underline".
- CursorStyleBlock : CursorStyle
-
CursorStyleBlock selects "block".
- CursorStyleDefault : CursorStyle
-
CursorStyleDefault selects "default".
- CursorStyleUnderline : CursorStyle
-
CursorStyleUnderline selects "underline".
-
DegradeUnsupported omits the capability, runs the reduced command, and reports the decision to ServerOptions.WarningHandler as a WarningUnsupportedFeature.
- DestroyUnattachedKeepGroup : DestroyUnattached
-
DestroyUnattachedKeepGroup selects "keep-group".
- DestroyUnattachedKeepLast : DestroyUnattached
-
DestroyUnattachedKeepLast selects "keep-last".
- DestroyUnattachedOff : DestroyUnattached
-
DestroyUnattachedOff selects "off".
- DestroyUnattachedOn : DestroyUnattached
-
DestroyUnattachedOn selects "on".
- DetachOnDestroyNext : DetachOnDestroy
-
DetachOnDestroyNext selects "next".
- DetachOnDestroyNoDetached : DetachOnDestroy
-
DetachOnDestroyNoDetached selects "no-detached".
- DetachOnDestroyOff : DetachOnDestroy
-
DetachOnDestroyOff selects "off".
- DetachOnDestroyOn : DetachOnDestroy
-
DetachOnDestroyOn selects "on".
- DetachOnDestroyPrevious : DetachOnDestroy
-
DetachOnDestroyPrevious selects "previous".
- ExtendedKeysAlways : ExtendedKeys
-
ExtendedKeysAlways selects "always".
- ExtendedKeysFormatCSIU : ExtendedKeysFormat
-
ExtendedKeysFormatCSIU selects "csi-u".
- ExtendedKeysFormatXTerm : ExtendedKeysFormat
-
ExtendedKeysFormatXTerm selects "xterm".
- ExtendedKeysOff : ExtendedKeys
-
ExtendedKeysOff selects "off".
- ExtendedKeysOn : ExtendedKeys
-
ExtendedKeysOn selects "on".
- FailUnsupported : UnsupportedPolicy
-
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.
-
FilterSchemaVersion identifies external metadata for the generated filter JSON wire schema. It is not embedded in JSON and is independent of the tmux
Version.
- GetClipboardBoth : GetClipboard
-
GetClipboardBoth selects "both".
- GetClipboardBuffer : GetClipboard
-
GetClipboardBuffer selects "buffer".
- GetClipboardOff : GetClipboard
-
GetClipboardOff selects "off".
- GetClipboardRequest : GetClipboard
-
GetClipboardRequest selects "request".
-
MaximumTestedVersion is the newest numbered tmux feature level covered by this package's tests. That feature level is tested against tmux 3.7c.
- MenuBorderLinesDouble : MenuBorderLines
-
MenuBorderLinesDouble selects "double".
- MenuBorderLinesHeavy : MenuBorderLines
-
MenuBorderLinesHeavy selects "heavy".
- MenuBorderLinesNone : MenuBorderLines
-
MenuBorderLinesNone selects "none".
- MenuBorderLinesPadded : MenuBorderLines
-
MenuBorderLinesPadded selects "padded".
- MenuBorderLinesRounded : MenuBorderLines
-
MenuBorderLinesRounded selects "rounded".
- MenuBorderLinesSimple : MenuBorderLines
-
MenuBorderLinesSimple selects "simple".
- MenuBorderLinesSingle : MenuBorderLines
-
MenuBorderLinesSingle selects "single".
- MessageLine0 : MessageLine
-
MessageLine0 selects "0".
- MessageLine1 : MessageLine
-
MessageLine1 selects "1".
- MessageLine2 : MessageLine
-
MessageLine2 selects "2".
- MessageLine3 : MessageLine
-
MessageLine3 selects "3".
- MessageLine4 : MessageLine
-
MessageLine4 selects "4".
-
MinimumConnectionVersion is the oldest tmux feature level that supports terminal Connection ownership. Later releases may strengthen individual lifecycle guarantees without changing this floor.
-
MinimumSupportedVersion is the oldest tmux feature level supported by this package.
-
ModeKeysEmacs selects "emacs".
-
ModeKeysVi selects "vi".
-
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.
-
NewWindowDirectionAfter places the new winlink after the target.
-
NewWindowDirectionBefore places the new winlink before the target.
- NewWindowDirectionDefault : NewWindowDirection
-
NewWindowDirectionDefault uses the next free index with Session.NewWindow when Index is nil; Window.NewWindow instead keeps the receiver's exact occupied target.
-
OpComplete is an operation tmux ran successfully.
-
OpFailed is an operation tmux refused. Only an operation sent alone can receive this status.
-
OpIndeterminate is an operation dispatched without enough reply evidence to prove whether tmux applied or rejected it.
-
OpSkipped is an operation the plan did not dispatch because an earlier dispatch failed or became indeterminate.
-
OptionOriginInherited identifies a value inherited from a parent scope.
- OptionOriginLocal : OptionOrigin
-
OptionOriginLocal identifies a value set directly at the queried scope.
- PaneBorderIndicatorsArrows : PaneBorderIndicators
-
PaneBorderIndicatorsArrows selects "arrows".
- PaneBorderIndicatorsBoth : PaneBorderIndicators
-
PaneBorderIndicatorsBoth selects "both".
- PaneBorderIndicatorsColour : PaneBorderIndicators
-
PaneBorderIndicatorsColour selects "colour".
- PaneBorderIndicatorsOff : PaneBorderIndicators
-
PaneBorderIndicatorsOff selects "off".
- PaneBorderLinesDouble : PaneBorderLines
-
PaneBorderLinesDouble selects "double".
- PaneBorderLinesHeavy : PaneBorderLines
-
PaneBorderLinesHeavy selects "heavy".
- PaneBorderLinesNumber : PaneBorderLines
-
PaneBorderLinesNumber selects "number".
- PaneBorderLinesSimple : PaneBorderLines
-
PaneBorderLinesSimple selects "simple".
- PaneBorderLinesSingle : PaneBorderLines
-
PaneBorderLinesSingle selects "single".
- PaneBorderLinesSpaces : PaneBorderLines
-
PaneBorderLinesSpaces selects "spaces".
- PaneBorderStatusBottom : PaneBorderStatus
-
PaneBorderStatusBottom selects "bottom".
- PaneBorderStatusOff : PaneBorderStatus
-
PaneBorderStatusOff selects "off".
- PaneBorderStatusTop : PaneBorderStatus
-
PaneBorderStatusTop selects "top".
-
PaneDirectionAbove places the pane above the target.
- PaneDirectionBelow : PaneDirection
-
PaneDirectionBelow places the pane below the target.
-
PaneDirectionLeft places the pane to the left of the target.
-
PaneDirectionRight places the pane to the right of the target.
-
PaneInputDisable disables input without selecting the target pane.
-
PaneInputEnable enables input without selecting the target pane.
- PaneInputUnchanged : PaneInputMode
-
PaneInputUnchanged leaves the target pane's input state unchanged.
-
PaneMarkClear clears the server-wide marked pane without selecting the target.
-
PaneMarkSet makes the target the server-wide marked pane without selecting it.
- PaneMarkUnchanged : PaneMarkMode
-
PaneMarkUnchanged leaves the server-wide marked pane unchanged.
-
PaneResizeDirectionDown selects tmux's downward adjustment.
-
PaneResizeDirectionLeft selects tmux's leftward adjustment.
- PaneResizeDirectionNone : PaneResizeDirection
-
PaneResizeDirectionNone omits a directional resize.
-
PaneResizeDirectionRight selects tmux's rightward adjustment.
-
PaneResizeDirectionUp selects tmux's upward adjustment.
- PaneScrollbarsModal : PaneScrollbars
-
PaneScrollbarsModal selects "modal".
- PaneScrollbarsOff : PaneScrollbars
-
PaneScrollbarsOff selects "off".
- PaneScrollbarsOn : PaneScrollbars
-
PaneScrollbarsOn selects "on".
- PaneScrollbarsPositionLeft : PaneScrollbarsPosition
-
PaneScrollbarsPositionLeft selects "left".
- PaneScrollbarsPositionRight : PaneScrollbarsPosition
-
PaneScrollbarsPositionRight selects "right".
-
PaneSelectDirectionDown selects the pane below the target.
-
PaneSelectDirectionLast selects the previously active pane.
-
PaneSelectDirectionLeft selects the pane to the left of the target.
- PaneSelectDirectionNone : PaneSelectDirection
-
PaneSelectDirectionNone selects no relative pane.
-
PaneSelectDirectionRight selects the pane to the right of the target.
-
PaneSelectDirectionUp selects the pane above the target.
- PopupBorderLinesDouble : PopupBorderLines
-
PopupBorderLinesDouble selects "double".
- PopupBorderLinesHeavy : PopupBorderLines
-
PopupBorderLinesHeavy selects "heavy".
- PopupBorderLinesNone : PopupBorderLines
-
PopupBorderLinesNone selects "none".
- PopupBorderLinesPadded : PopupBorderLines
-
PopupBorderLinesPadded selects "padded".
- PopupBorderLinesRounded : PopupBorderLines
-
PopupBorderLinesRounded selects "rounded".
- PopupBorderLinesSimple : PopupBorderLines
-
PopupBorderLinesSimple selects "simple".
- PopupBorderLinesSingle : PopupBorderLines
-
PopupBorderLinesSingle selects "single".
-
PrefixPrimary selects tmux's primary prefix key.
-
PrefixSecondary selects tmux's secondary prefix key.
- PromptCommandCursorStyleBar : PromptCommandCursorStyle
-
PromptCommandCursorStyleBar selects "bar".
- PromptCommandCursorStyleBlinkingBar : PromptCommandCursorStyle
-
PromptCommandCursorStyleBlinkingBar selects "blinking-bar".
- PromptCommandCursorStyleBlinkingBlock : PromptCommandCursorStyle
-
PromptCommandCursorStyleBlinkingBlock selects "blinking-block".
- PromptCommandCursorStyleBlinkingUnderline : PromptCommandCursorStyle
-
PromptCommandCursorStyleBlinkingUnderline selects "blinking-underline".
- PromptCommandCursorStyleBlock : PromptCommandCursorStyle
-
PromptCommandCursorStyleBlock selects "block".
- PromptCommandCursorStyleDefault : PromptCommandCursorStyle
-
PromptCommandCursorStyleDefault selects "default".
- PromptCommandCursorStyleUnderline : PromptCommandCursorStyle
-
PromptCommandCursorStyleUnderline selects "underline".
- PromptCursorStyleBar : PromptCursorStyle
-
PromptCursorStyleBar selects "bar".
- PromptCursorStyleBlinkingBar : PromptCursorStyle
-
PromptCursorStyleBlinkingBar selects "blinking-bar".
- PromptCursorStyleBlinkingBlock : PromptCursorStyle
-
PromptCursorStyleBlinkingBlock selects "blinking-block".
- PromptCursorStyleBlinkingUnderline : PromptCursorStyle
-
PromptCursorStyleBlinkingUnderline selects "blinking-underline".
- PromptCursorStyleBlock : PromptCursorStyle
-
PromptCursorStyleBlock selects "block".
- PromptCursorStyleDefault : PromptCursorStyle
-
PromptCursorStyleDefault selects "default".
- PromptCursorStyleUnderline : PromptCursorStyle
-
PromptCursorStyleUnderline selects "underline".
- PromptTypeAll : PromptType
-
PromptTypeAll selects every prompt-history class and omits -T.
-
PromptTypeCommand selects command-prompt history.
-
PromptTypeSearch selects search-prompt history.
-
PromptTypeTarget selects target-prompt history.
-
PromptTypeWindowTarget selects window-target-prompt history.
- RemainOnExitFailed : RemainOnExit
-
RemainOnExitFailed selects "failed".
- RemainOnExitKey : RemainOnExit
-
RemainOnExitKey selects "key".
- RemainOnExitOff : RemainOnExit
-
RemainOnExitOff selects "off".
- RemainOnExitOn : RemainOnExit
-
RemainOnExitOn selects "on".
- RotateWindowDefault : RotateWindowDirection
-
RotateWindowDefault uses tmux's default rotation.
-
RotateWindowDown rotates pane positions toward higher indexes.
-
RotateWindowUp rotates pane positions toward lower indexes.
- SetClipboardExternal : SetClipboard
-
SetClipboardExternal selects "external".
- SetClipboardOff : SetClipboard
-
SetClipboardOff selects "off".
- SetClipboardOn : SetClipboard
-
SetClipboardOn selects "on".
-
ShellPrompt is the prompt drawn when
ServerOptions.FixedShellis enabled.
- SilenceActionAny : SilenceAction
-
SilenceActionAny selects "any".
- SilenceActionCurrent : SilenceAction
-
SilenceActionCurrent selects "current".
- SilenceActionNone : SilenceAction
-
SilenceActionNone selects "none".
- SilenceActionOther : SilenceAction
-
SilenceActionOther selects "other".
-
Status2 selects "2".
-
Status3 selects "3".
-
Status4 selects "4".
-
Status5 selects "5".
- StatusJustifyAbsoluteCentre : StatusJustify
-
StatusJustifyAbsoluteCentre selects "absolute-centre".
- StatusJustifyCentre : StatusJustify
-
StatusJustifyCentre selects "centre".
- StatusJustifyLeft : StatusJustify
-
StatusJustifyLeft selects "left".
- StatusJustifyRight : StatusJustify
-
StatusJustifyRight selects "right".
- StatusKeysEmacs : StatusKeys
-
StatusKeysEmacs selects "emacs".
- StatusKeysVi : StatusKeys
-
StatusKeysVi selects "vi".
-
StatusOff selects "off".
-
StatusOn selects "on".
- StatusPositionBottom : StatusPosition
-
StatusPositionBottom selects "bottom".
- StatusPositionTop : StatusPosition
-
StatusPositionTop selects "top".
-
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.
-
SwapPaneDirectionDown swaps with the next pane in index order.
- SwapPaneDirectionNone : SwapPaneDirection
-
SwapPaneDirectionNone selects no adjacent pane.
-
SwapPaneDirectionUp swaps with the previous pane in index order.
-
TemporaryNamePrefix prefixes names generated by
NewSessionandNewWindow.
- TerminalOverrideValueFlag : TerminalOverrideValueKind
-
TerminalOverrideValueFlag identifies a capability without an assigned value.
-
TerminalOverrideValueInteger identifies an unsigned decimal integer.
-
TerminalOverrideValueText identifies an assigned non-integer string.
- TreeSortDefault : TreeSortOrder
-
TreeSortDefault leaves the configured choose-tree ordering unchanged.
-
TreeSortIndex orders tree entries by index.
-
TreeSortName orders tree entries by name.
-
TreeSortSize orders tree entries by size.
-
TreeSortTime orders tree entries by activity time.
- VisualActivityBoth : VisualActivity
-
VisualActivityBoth selects "both".
- VisualActivityOff : VisualActivity
-
VisualActivityOff selects "off".
- VisualActivityOn : VisualActivity
-
VisualActivityOn selects "on".
- VisualBellBoth : VisualBell
-
VisualBellBoth selects "both".
- VisualBellOff : VisualBell
-
VisualBellOff selects "off".
- VisualBellOn : VisualBell
-
VisualBellOn selects "on".
- VisualSilenceBoth : VisualSilence
-
VisualSilenceBoth selects "both".
- VisualSilenceOff : VisualSilence
-
VisualSilenceOff selects "off".
- VisualSilenceOn : VisualSilence
-
VisualSilenceOn selects "on".
-
WaitForModeLock acquires Channel's tmux mutex.
-
WaitForModeSignal signals Channel and wakes waiters.
-
WaitForModeUnlock releases Channel's tmux mutex.
- WaitForModeWait : WaitForMode
-
WaitForModeWait waits until another client signals Channel.
-
WarningCommandStderr reports stderr from a completed command whose Python API treats the diagnostic as nonfatal.
- WarningUnsupportedFeature : WarningKind
-
WarningUnsupportedFeature reports a requested feature omitted because the connected tmux binary is too old.
-
WindowResizeDirectionDown adjusts the window downward.
-
WindowResizeDirectionLeft adjusts the window leftward.
- WindowResizeDirectionNone : WindowResizeDirection
-
WindowResizeDirectionNone selects no directional adjustment.
-
WindowResizeDirectionRight adjusts the window rightward.
-
WindowResizeDirectionUp adjusts the window upward.
- WindowSizeLargest : WindowSize
-
WindowSizeLargest selects "largest".
- WindowSizeLatest : WindowSize
-
WindowSizeLatest selects "latest".
- WindowSizeManual : WindowSize
-
WindowSizeManual selects "manual".
- WindowSizeSmallest : WindowSize
-
WindowSizeSmallest selects "smallest".
- Build ( ctx : context.Context , server : tmux.Server , workspace : Workspace ) (tmux.Session, error)
-
Build creates the workspace on server and returns the created session.
Build is not atomic. A failure after session creation returns that session; completed mutations remain in tmux. Command failures are not normalized.
Build creates the session and an attached control connection in one process, uses that connection for the build, and closes it before returning. The returned Session is not bound to the closed connection. Build verifies that the session remains reachable after closing it. An attached connection may fire client hooks and policies.
Each pane receives workspace, window, and pane CommandsBefore, then its own Commands. Sleep values pause Build rather than the pane.
Discussed in Build a workspace from a file
- BuildInto ( ctx : context.Context , session : tmux.Session , workspace : Workspace ) error
-
BuildInto populates the initial session described by workspace. The session must already have been created from
Workspace.InitialSessionRequest. BuildInto uses the session's existing server and transport; it neither creates a session nor opens or owns a connection.BuildInto is not atomic. A failure leaves completed mutations in tmux.
- CaptureLine ( line : int ) CapturePosition
-
CaptureLine returns the canonical tmux representation of a capture line. Zero is the first visible line; negative values address history.
- ClientNameIs ( value : ClientName ) ClientFilter
-
ClientNameIs returns a
ClientFilterthat exactly matches the stable tmux client name from Client.Name. It sets no other criteria and does not validate value.
- ClientReadOnlyIs ( value : bool ) ClientFilter
-
ClientReadOnlyIs returns a
ClientFilterthat exactly matches the materialized read-only state from Client.ReadOnly. It sets no other criteria and does not validate value.
-
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
ErrNoMatchfor no matches orErrMultipleMatchesfor multiple matches; callers can classify either error witherrors.Is.Discussed in Filtering and querying, in practice
-
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 withErrMultipleMatches. Callers can classify either error witherrors.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 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 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.
-
Main runs the one-call package lifecycle for tmuxtest. It prepares short temporary paths, redirects
suiteEnvironmentinto them, runs m, cleans registered servers, restores the environment, and returns the final status. TestMain should return its result throughos.Exit.
- NewControlMode ( ctx : context.Context , t : testing.TB , server : tmux.Server , session : tmux.Session ) *ControlMode
-
NewControlMode starts a
ControlModeattached 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 calltesting.TB.Fatal. ctx bounds startup and registration only, not the returned client's lifetime.
-
NewPlan returns an empty
Plan.
- NewServer ( options : ServerOptions ) (Server, error)
-
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
- NewServer ( ctx : context.Context , t : testing.TB ) tmux.Server
-
NewServer starts an isolated
tmux.Serverwith a session named "work". Startup uses ctx and the harness timeout, whichever ends first. It registers bounded cleanup with t; setup failures calltesting.TB.Fatal. The context does not govern later server cleanup or daemon lifetime.
-
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
- NewServerWithOptions ( ctx : context.Context , t : testing.TB , options : ServerOptions ) tmux.Server
-
NewServerWithOptions prepares an isolated harness-owned
tmux.Serverfrom options. Initial startup uses ctx and the harness timeout, whichever ends first. The daemon starts only whenServerOptions.InitialSessionis non-nil or a later tmux command starts it. It registers bounded cleanup with t; setup failures calltesting.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
-
NewSession creates a test-owned
tmux.Sessionand registers cleanup against its stable ID. An emptytmux.NewSessionRequest.Namereceives a collision-checked temporary name. The request and referenced values are copied before tmux is called, and setup failures calltesting.TB.Fatal. Cleanup belongs to t rather than ctx and continues to target the session if it is renamed.
- NewSparseArray ( entries : SparseEntry[T] ) (SparseArray[T], error)
-
NewSparseArray builds an array from entries, sorting them by index. It returns errors matching
ErrInvalidSparseIndexorErrDuplicateSparseIndexfor negative, overflowing, or duplicate indices.
- NewWindow ( ctx : context.Context , t : testing.TB , session : tmux.Session , request : tmux.NewWindowRequest ) tmux.Window
-
NewWindow creates a test-owned
tmux.Windowand registers cleanup against its stable ID. A niltmux.NewWindowRequest.Namereceives 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 calltesting.TB.Fatal. Cleanup belongs to t rather than ctx and follows the window if it is moved.
-
PackageVersion returns the release version recorded in Go build metadata. Development builds and binaries without module metadata return "", false.
- PaneActiveIs ( value : bool ) PaneFilter
-
PaneActiveIs returns a
PaneFilterthat exactly matches the materialized active state from Pane.Active. It sets no other criteria and does not validate value.
-
PaneCells returns an explicit pane size measured in cells. Resize validates that cells is nonnegative; zero remains an explicit request.
- PaneCommandIs ( value : string ) PaneFilter
-
PaneCommandIs returns a
PaneFilterthat exactly matches the materialized current command from Pane.CurrentCommand. It sets no other criteria and does not validate value.
- PaneFromEnv ( ctx : context.Context , environment : map[string]string ) (Pane, error)
-
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
- PaneIDIs ( value : PaneID ) PaneFilter
-
PaneIDIs returns a
PaneFilterthat 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
-
PaneIndexIs returns a
PaneFilterthat exactly matches the nonnegative pane index from Pane.Index. It sets no other criteria and does not validate value.
-
PanePercent returns an explicit percentage of the window size. Resize validates that percent is between 0 and 100 inclusive; zero remains an explicit request.
-
PaneRef returns a selector-relative
Refaddressing a pane by ID, for a caller holding an identifier rather than a materialized record.
- PaneSessionIDIs ( value : SessionID ) PaneFilter
-
PaneSessionIDIs returns a
PaneFilterthat 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
-
PaneTitleIs returns a
PaneFilterthat exactly matches the materialized title from Pane.Title. It sets no other criteria and does not validate value.
- PaneWindowIDIs ( value : WindowID ) PaneFilter
-
PaneWindowIDIs returns a
PaneFilterthat 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
-
PaneWindowIndexIs returns a
PaneFilterthat exactly matches the nonnegative winlink index from Pane.WindowIndex. It sets no other criteria and does not validate value.
-
Parse decodes one workspace document. Unknown fields are rejected so a misspelled key fails loudly instead of being dropped.
Discussed in Build a workspace from a file
-
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.
- ParseControlNotification ( line : []byte ) (ControlNotification, error)
-
ParseControlNotification parses one newline-free tmux control-mode notification record. It requires exact control framing and a supported kind, returns errors compatible with
ErrMalformedControlNotificationorErrUnknownControlNotification, and copies all caller-owned input before returning. It never returns a partial notification.
-
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 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.
-
ParseVersion parses a raw tmux version token. It returns a
VersionErrormatchingErrInvalidVersionwhen the token cannot be parsed.
-
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.
- Poll ( ctx : context.Context , interval : time.Duration , condition : func(context.Context) (bool, error) ) error
-
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. Use Poll to wait for pane output;
Server.WaitForsignals tmux's separate wait-for channel.
-
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.
- RunInPane ( ctx : context.Context , t : testing.TB , command : string ) tmux.Pane
-
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 calltesting.TB.Fatal. UseNewServerWithOptionsfor custom topology or configuration.
- Screen ( ctx : context.Context , t : testing.TB , pane : tmux.Pane ) []string
-
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.Capturewithtmux.CaptureBoundaryto read scrollback.Read failures call
testing.TB.Fatal.
- SessionAttachedIs ( value : bool ) SessionFilter
-
SessionAttachedIs returns a
SessionFilterthat exactly matches the materialized attachment state from Session.Attached. It sets no other criteria and does not validate value.
- SessionFromEnv ( ctx : context.Context , environment : map[string]string ) (Session, error)
-
SessionFromEnv returns the canonical session containing the environment's pane. Nil reads the process environment; a nonnil empty map does not.
Discussed in Environment
- SessionIDIs ( value : SessionID ) SessionFilter
-
SessionIDIs returns a
SessionFilterthat 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
-
SessionNameIs returns a
SessionFilterthat exactly matches the materialized session name from Session.Name. It sets no other criteria and does not validate value.
-
SessionRef returns a selector-relative
Refaddressing a session by ID, for a caller holding an identifier rather than a materialized record.
- StartPTYProcess ( ctx : context.Context , t : testing.TB , binary : string , arguments : []string , environment : []string ) *PTYProcess
-
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 calltesting.TB.Fatal.
- Type ( ctx : context.Context , t : testing.TB , pane : tmux.Pane , command : string )
-
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 )
-
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.
-
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.
- WaitFor ( ctx : context.Context , interval : time.Duration , condition : func(context.Context) (bool, error) ) error
-
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 )
-
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 )
-
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 )
-
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.RunInPanecalls it, and a test building its own pane should too.
- WaitForText ( ctx : context.Context , t : testing.TB , pane : tmux.Pane , text : string )
-
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.
-
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 querying, in practice
-
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
-
WindowActiveIs returns a
WindowFilterthat exactly matches the materialized active state from Window.Active. It sets no other criteria and does not validate value.
- WindowFromEnv ( ctx : context.Context , environment : map[string]string ) (Window, error)
-
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
- WindowIDIs ( value : WindowID ) WindowFilter
-
WindowIDIs returns a
WindowFilterthat 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
-
WindowIndexIs returns a
WindowFilterthat exactly matches the nonnegative winlink index from Window.Index. It sets no other criteria and does not validate value.
- WindowNameIs ( value : string ) WindowFilter
-
WindowNameIs returns a
WindowFilterthat exactly matches the materialized window name from Window.Name. It sets no other criteria and does not validate value.
-
WindowRef returns a selector-relative
Refaddressing a window by ID, for a caller holding an identifier rather than a materialized record.
- WindowSessionIDIs ( value : SessionID ) WindowFilter
-
WindowSessionIDIs returns a
WindowFilterthat exactly matches the stable tmux session identifier from Window.SessionID, including its $ sigil. It sets no other criteria and does not validate value.