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

1099 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 4 types, 3 functions and constants
Server 56 members

One tmux server, addressed by the socket it listens on.

ServerImplementation 3 members

Which server answered: tmux, a compatible reimplementation, or not yet determined.

ServerFeature 12 members

Coarse-grained promises callers choose around.

ServerCapabilities 4 members

What this server is known to support, decided without asking it.

kSocketPathLimit : std::size_t
attribute [source]
attribute [source]
kSocketPathLimit
socket_name_arguments ( name : std::string_view ) → expected< std::vector< std::string >, SocketError >
function [source]
function [source]
socket_name_arguments

-L name: a single component resolved under the socket directory.

socket_path_arguments ( path : std::string_view ) → expected< std::vector< std::string >, SocketError >
function [source]
function [source]
socket_path_arguments

-S path: used verbatim, so the address limit applies to it directly.

Session 3 types, 12 functions and constants
Session 33 members

One session, as one listing saw it.

hash<libtmux::Session> 0 members

Hashing an entity uses exactly what its equality compares, so values from separate listings key an unordered container consistently.

SessionId : EntityId< struct SessionIdKind >
typealias [source]
typealias [source]
SessionId
attached : BoolFieldHandle< Session >
attribute [source]
attribute [source]
attached
client_count : NumberFieldHandle< Session >
attribute [source]
attribute [source]
client_count
created : NumberFieldHandle< Session >
attribute [source]
attribute [source]
created
attribute [source]
attribute [source]
group
grouped : BoolFieldHandle< Session >
attribute [source]
attribute [source]
grouped
attribute [source]
attribute [source]
id
attribute [source]
attribute [source]
name
attribute [source]
attribute [source]
path
window_count : NumberFieldHandle< Session >
attribute [source]
attribute [source]
window_count
is_session_id ( value : std::string_view ) → bool
function [source]
function [source]
is_session_id
session_target ( session : std::string_view ) → expected< std::string, TargetError >
function [source]
function [source]
session_target

A session target is its id, or its validated name.

Window 4 types, 17 functions and constants
Window 44 members

One window, as one listing saw it.

hash<libtmux::Window> 0 members

Hashing a window, on the same terms as its equality.

WindowId : EntityId< struct WindowIdKind >
typealias [source]
typealias [source]
WindowId
active : BoolFieldHandle< Window >
attribute [source]
attribute [source]
active
activity : BoolFieldHandle< Window >
attribute [source]
attribute [source]
activity
attribute [source]
attribute [source]
bell
attribute [source]
attribute [source]
height
attribute [source]
attribute [source]
id
attribute [source]
attribute [source]
index
attribute [source]
attribute [source]
layout
linked_sessions : NumberFieldHandle< Window >
attribute [source]
attribute [source]
linked_sessions
attribute [source]
attribute [source]
name
pane_count : NumberFieldHandle< Window >
attribute [source]
attribute [source]
pane_count
session_id : StringFieldHandle< Window >
attribute [source]
attribute [source]
session_id
session_name : StringFieldHandle< Window >
attribute [source]
attribute [source]
session_name
attribute [source]
attribute [source]
width
zoomed : BoolFieldHandle< Window >
attribute [source]
attribute [source]
zoomed
is_window_id ( value : std::string_view ) → bool
function [source]
function [source]
is_window_id
window_target ( session : std::string_view , window : std::string_view ) → expected< std::string, TargetError >
function [source]
function [source]
window_target

A window target is its id, which needs no session, or session:window.

Pane 4 types, 26 functions and constants
Pane 58 members

One pane, as one listing saw it.

hash<libtmux::Pane> 0 members

Hashing a pane, on the same terms as its equality.

PaneId : EntityId< struct PaneIdKind >
typealias [source]
typealias [source]
PaneId
active : BoolFieldHandle< Pane >
attribute [source]
attribute [source]
active
at_bottom : BoolFieldHandle< Pane >
attribute [source]
attribute [source]
at_bottom
at_left : BoolFieldHandle< Pane >
attribute [source]
attribute [source]
at_left
at_right : BoolFieldHandle< Pane >
attribute [source]
attribute [source]
at_right
at_top : BoolFieldHandle< Pane >
attribute [source]
attribute [source]
at_top
command : StringFieldHandle< Pane >
attribute [source]
attribute [source]
command
dead : BoolFieldHandle< Pane >
attribute [source]
attribute [source]
dead
exit_status : NumberFieldHandle< Pane >
attribute [source]
attribute [source]
exit_status
height : NumberFieldHandle< Pane >
attribute [source]
attribute [source]
height
attribute [source]
attribute [source]
id
in_mode : BoolFieldHandle< Pane >
attribute [source]
attribute [source]
in_mode
index : NumberFieldHandle< Pane >
attribute [source]
attribute [source]
index
attribute [source]
attribute [source]
left
attribute [source]
attribute [source]
path
attribute [source]
attribute [source]
pid
piping : BoolFieldHandle< Pane >
attribute [source]
attribute [source]
piping
session_id : StringFieldHandle< Pane >
attribute [source]
attribute [source]
session_id
session_name : StringFieldHandle< Pane >
attribute [source]
attribute [source]
session_name
title : StringFieldHandle< Pane >
attribute [source]
attribute [source]
title
attribute [source]
attribute [source]
top
attribute [source]
attribute [source]
tty
width : NumberFieldHandle< Pane >
attribute [source]
attribute [source]
width
window_id : StringFieldHandle< Pane >
attribute [source]
attribute [source]
window_id
is_pane_id ( value : std::string_view ) → bool
function [source]
function [source]
is_pane_id

Whether a value is written as an id, which is what decides that it needs no separator validation below — not whether tmux would resolve it.

x is an id by this test and no pane by tmux's, and both are right: it carries no separator, so composing it can only produce the caller's own mistake back.

pane_target ( session : std::string_view , window : std::string_view , pane : std::string_view ) → expected< std::string, TargetError >
function [source]
function [source]
pane_target

A pane target is its id, or session:window.pane.

Client 3 types, 10 functions and constants
Client 17 members

One attached client, as one listing saw it.

hash<libtmux::Client> 0 members

Hashing a client, on the same terms as its equality.

control_mode : BoolFieldHandle< Client >
attribute [source]
attribute [source]
control_mode
created : NumberFieldHandle< Client >
attribute [source]
attribute [source]
created
attribute [source]
attribute [source]
height
last_activity : NumberFieldHandle< Client >
attribute [source]
attribute [source]
last_activity
attribute [source]
attribute [source]
name
read_only : BoolFieldHandle< Client >
attribute [source]
attribute [source]
read_only
session_name : StringFieldHandle< Client >
attribute [source]
attribute [source]
session_name
terminal : StringFieldHandle< Client >
attribute [source]
attribute [source]
terminal
attribute [source]
attribute [source]
tty
attribute [source]
attribute [source]
width
Options 2 types
OptionEntry 4 members

One option as tmux reports it: its name, its value, and the array index it sits at when it is an array option.

Options — Functions 3 functions and constants
parse_option ( line : std::string_view ) → std::optional< OptionEntry >
function [source]
function [source]
parse_option

Parse one line.

Returns nullopt for a blank line so callers can feed raw output straight in.

parse_options ( output : std::string_view ) → std::vector< OptionEntry >
function [source]
function [source]
parse_options
unquote ( value : std::string_view ) → std::string
function [source]
function [source]
unquote

Undo the quoting tmux applies when it prints a value.

tmux picks one of four forms, and a reader that knows only one corrupts the rest: '' for an empty value; double quotes when the value contains any of / #';${}; single quotes when it contains a double quote; and otherwise no / quotes at all. Inside any of them the body is escaped the way vis does it / — \t, \n, \\, \ooo for a byte with no printable form — and a / leading tilde is escaped whether or not anything else is. / / This is the inverse of tmux's own args_escape, so a value read here and written back is the value that was there.

Keys and bindings 4 functions and constants
kNamedKeys : std::array
attribute [source]
attribute [source]
kNamedKeys

Named keys tmux accepts, taken from the table in its own key-string.c at the oldest supported release.

Function keys are generated rather than listed, and a single character is handled separately.

is_function_key ( name : std::string_view ) → bool
function [source]
function [source]
is_function_key
is_key_name ( key : std::string_view ) → bool
function [source]
function [source]
is_key_name

Accept a key with any number of C-, M-, or S- modifiers.

literal_arguments ( text : std::string_view ) → expected< std::vector< std::string >, KeyError >
function [source]
function [source]
literal_arguments

Send text exactly as written: the flag, the end of flags, and the text.

-- is part of the fragment rather than something a caller appends, because text beginning with a dash is read as another send-keys option without it and that is not a mistake worth making twice. It was made twice: this returned the flag and the text alone, Pane::send_text inserted the separator afterwards, and Chain::send_text did not — so the same text through the two spellings reached tmux as two different commands.

Buffers 1 type, 4 functions and constants
Buffer 9 members

A named piece of text the server holds, outliving the pane it came from.

created : NumberFieldHandle< Buffer >
attribute [source]
attribute [source]
created
attribute [source]
attribute [source]
name
attribute [source]
attribute [source]
sample
attribute [source]
attribute [source]
size
Terminal capabilities 1 function or constant
to_string ( implementation : ServerImplementation ) → std::string_view ( backend : BackendKind ) → std::string_view ( feature : ServerFeature ) → std::string_view ( error : CardinalityError ) → std::string_view ( kind : FailureKind ) → std::string_view ( failure : const CommandFailure & ) → std::string ( status : DeliveryStatus ) → std::string_view ( session : const Session & ) → std::string ( window : const Window & ) → std::string ( pane : const Pane & ) → std::string ( client : const Client & ) → std::string ( error : KeyError ) → std::string_view ( kind : NotificationKind ) → std::string_view ( error : SocketError ) → std::string_view ( error : TargetError ) → std::string_view ( error : VersionError ) → std::string_view
functionoverload16 overloads [source]
functionoverload16 overloads [source]
to_string
Versions 1 type, 8 functions and constants
Version 5 members

A tmux version, ordered so a feature gate can compare against a literal.

kMinimumSupported : Version
attribute [source]
attribute [source]
kMinimumSupported

The oldest release this library supports, matching the Python package.

LIBTMUX_VERSION_MAJOR
constant [source]
constant [source]
LIBTMUX_VERSION_MAJOR
LIBTMUX_VERSION_MINOR
constant [source]
constant [source]
LIBTMUX_VERSION_MINOR
LIBTMUX_VERSION_PATCH
constant [source]
constant [source]
LIBTMUX_VERSION_PATCH
LIBTMUX_VERSION_STRING
constant [source]
constant [source]
LIBTMUX_VERSION_STRING
is_supported ( version : const Version & ) → bool
function [source]
function [source]
is_supported
library_version ( ) → std::string_view
function [source]
function [source]
library_version

This package's own version, not tmux's.

parse_version ( output : std::string_view ) → expected< Version, VersionError >
function [source]
function [source]
parse_version

Parse the first line of tmux -V, with or without its trailing newline.

Commands 17 types, 5 functions and constants
AttachCommand 3 members

An attach argv and the private route selecting this server incarnation.

Command 6 members

One command this tmux understands.

CommandArgument 6 members

One argument, carrying whether any part of it is a secret.

CommandBatch 6 members

The argv a chain becomes: commands joined by tmux's separator.

CommandOperation 7 members

Move-only result handle for one admitted command; its methods are not concurrent.

CommandRuntime 11 members

Move-only owner of the transport threads, admission bound, and observations.

ArgumentSensitivity 2 members

Whether an argument may appear in a diagnostic, a log, or an error message.

CommandFailure 4 members

A command that did not produce an answer, and how far it got.

CommandReport 4 members

Told about every command, as it finishes.

CommandRuntimeConfig 1 members

The maximum number of accepted commands retaining any lifecycle leg.

CommandRuntimeShutdown 5 members

The first successful close report; every later call returns this value.

ExecutionPolicy 3 members

What a call waits and holds when the caller did not say.

CommandObserver : std::function< void(const CommandReport &)>
typealias [source]
typealias [source]
CommandObserver

Every member expires on return; a caller keeping any of it copies it.

attribute [source]
attribute [source]
alias
kCommandSeparator : std::string_view
attribute [source]
attribute [source]
kCommandSeparator
attribute [source]
attribute [source]
name
attribute [source]
attribute [source]
usage
Control mode 10 types, 4 functions and constants
Connection 15 members

One held-open control client.

NotificationRange 3 members

Everything tmux says, until the deadline, as one loop.

iterator 4 members

Single-pass, and the value it yields is borrowed: advancing invalidates the notification the previous dereference viewed.

NotificationWatch 6 members

One independent view of outside-block events emitted after opening.

Parser 3 members

The control-mode wire format, decoded into whole events.

ControlTerminal 2 members

How tmux closed a reply block: normally, or reporting a failure.

ControlBlock 8 members

One reply block, framed between tmux's begin and its terminator.

ControlCommand 1 members

One command as argv, before it is joined into a control-mode line.

Notification 1 members

One control event tmux sent unprompted, still as bytes.

ParsedNotification 8 members

A notification's arguments, as views into the notification it was read from.

kDefaultLineBytes : std::size_t
attribute [source]
attribute [source]
kDefaultLineBytes
kDefaultRetainedReplyBytes : std::size_t
attribute [source]
attribute [source]
kDefaultRetainedReplyBytes

How much of one reply a decoder holds, and how long a single line may grow before the stream is called broken.

A subprocess ends and gives its memory back; a connection does not, so the bound has to be in the decoder rather than in whatever reads it afterwards. The reply bound is the subprocess transport's capture limit, so the same call costs the same memory over either transport. The line bound has no subprocess equivalent: it is the point past which an unterminated line is evidence of a broken stream rather than a large answer.

layout_contains_pane ( layout_change_text : std::string_view , pane_id : std::string_view ) → std::optional< bool >
function [source]
function [source]
layout_contains_pane
parse ( notification : const Notification & ) → ParsedNotification ( Notification && ) → ParsedNotification
functionoverload2 overloads [source]
functionoverload2 overloads [source]
parse
Formats 2 types, 4 functions and constants
FormatBuilder 3 members

Build a format from alternating literal and variable pieces so a caller never hand-concatenates and forgets to escape one of them.

FormatArgument 2 members

Where a tmux subcommand wants its format string.

kFormatEscape : std::string_view
attribute [source]
attribute [source]
kFormatEscape

A separator absent from every format name is not absent from every format value, which is the whole difficulty.

tmux rename-window 'a␞b` is accepted, and one such name used to make every window and pane listing on that server fail to split — data the caller never chose breaking reads of everything else.

So tmux escapes the separator before it can be mistaken for one. U+241B pairs with it and is escaped in turn, which is what makes the transform reversible: ␛S is a separator that was in the value and ␛E is an escape marker that was, and neither has a second reading.

kFormatSeparator : std::string_view
attribute [source]
attribute [source]
kFormatSeparator

tmux joins requested formats with a separator that cannot appear in a format name.

U+241E matches the Python implementation's default so both can read the same recorded output.

It is multi-byte, so every tmux this library starts is passed -u: a tmux that believes the terminal is not UTF-8 substitutes an underscore and no row splits at all.

escape_literal ( text : std::string_view ) → std::string
function [source]
function [source]
escape_literal

Escape literal text for inclusion in a format string.

variable ( name : std::string_view ) → std::string
function [source]
function [source]
variable

Wrap a variable name as a substitution.

The name is not escaped: a name is chosen by the caller from tmux's format vocabulary, not built from data.

Queries 1 type, 21 functions and constants
Group 2 members

Several expressions combined, all of them or any of them.

Referenced : std::ranges::input_range
typealias [source]
typealias [source]
Referenced

A borrowed element of a range, rather than a copy of it.

These lookups reference an element of the range they were given, so the range has to outlive the result. That is why they take an lvalue.

RelatedMany : typename Entity
typealias [source]
typealias [source]
RelatedMany

The related entity is whatever the accessor yields, so a bare flag field can stand in for a predicate here exactly as it does in matching .

RelatedOne : typename Entity
typealias [source]
typealias [source]
RelatedOne

The entity on the far side of a to-one link, with the accessor's indirection and qualifiers stripped away.

all_of ( typename Entity , name : std::string , read : auto , predicate : auto ) → typename Entity
function [source]
function [source]
all_of
any_of ( typename Entity , name : std::string , read : auto , predicate : auto ) → typename Entity
function [source]
function [source]
any_of
children_of ( typename Parent , typename Child , rows : const std::vector< Child > & , foreign_key : StringFieldHandle< Child > , key : StringFieldHandle< Parent > ) → typename Parent ( typename Parent , typename Child , const std::vector< Child > && , StringFieldHandle< Child > , StringFieldHandle< Parent > ) → typename Parent
functionoverload2 overloads [source]
functionoverload2 overloads [source]
children_of

Join two listings on the id one of them carries.

A relation predicate has to reach the related rows without running tmux, so the caller lists both kinds once and links them here. The result borrows the rows it was given, exactly as a filtered view does, so it must not outlive the listing it reads.

exactly_one ( Range : ReferenceRange , range : Range & ) → ReferenceRange
function [source]
function [source]
exactly_one

exactly_one states that several is a caller error, and says which one.

Discussed in Filtering and querying, in practice

exactly_one_owned ( Range : std::ranges::input_range , range : Range && ) → std::ranges::input_range
function [source]
function [source]
exactly_one_owned
first ( Range : ReferenceRange , range : Range & ) → ReferenceRange
function [source]
function [source]
first

first states that a caller tolerates extras; it never reports several.

first_owned ( Range : std::ranges::input_range , range : Range && ) → std::ranges::input_range
function [source]
function [source]
first_owned
is ( typename Entity , name : std::string , read : auto , predicate : auto ) → typename Entity
function [source]
function [source]
is

An absent to-one link never satisfies is : a window with no active pane is not a window whose active pane runs an editor.

lookup_of ( name : std::string_view ) → expected< StringOp, LookupParseError >
function [source]
function [source]
lookup_of

eq is the implicit lookup, matching Python's bare field=value.

An empty name reaches here only from a key that carried no separator at all; a key ending in one is refused before this is asked.

lower ( typename Entity , typename Sink , expr : const FilterExpr< Entity > & , sink : Sink & ) → typename Entity
function [source]
function [source]
lower

A sink receives one call per node in prefix order.

Groups and negations are bracketed by begin/end so a sink never has to count operands itself.

matching ( typename Entity , expr : FilterExpr< Entity > ) → typename Entity
function [source]
function [source]
matching

matching(expr) is a range adaptor closure so it composes with std views.

matching ( typename Entity , expr : FilterExpr< Entity > ) → typename Entity ( typename Entity , field : BoolFieldHandle< Entity > ) → typename Entity
functionoverload2 overloads [source]
functionoverload2 overloads [source]
matching

matching(expr) is a range adaptor closure so it composes with std views.

name_of ( op : StringOp ) → std::string_view ( op : NumberOp ) → std::string_view
functionoverload2 overloads [source]
functionoverload2 overloads [source]
name_of
none_of ( typename Entity , name : std::string , read : auto , predicate : auto ) → typename Entity
function [source]
function [source]
none_of
parent_of ( typename Child , typename Parent , rows : const std::vector< Parent > & , foreign_key : StringFieldHandle< Child > , key : StringFieldHandle< Parent > ) → typename Child ( typename Child , typename Parent , const std::vector< Parent > && , StringFieldHandle< Child > , StringFieldHandle< Parent > ) → typename Child
functionoverload2 overloads [source]
functionoverload2 overloads [source]
parent_of

The same join read the other way: the one row a child points at, or none.

parse_lookup ( typename Entity , term : std::string_view , fields : std::span< const StringFieldHandle< Entity > > ) → typename Entity
function [source]
function [source]
parse_lookup

Parse one field[__lookup]=value term against a caller-supplied field table.

The value is taken verbatim after the first =, so a value containing = or __ survives unchanged; only the key is split.

quantified ( typename Entity , name : std::string , quantifier : Quantifier , read : auto , predicate : auto ) → typename Entity
function [source]
function [source]
quantified

To-many and to-one links take different accessors, so they get different builders rather than one that has to compile both shapes.

replay ( typename Sink , nodes : const LoweredExpression & , sink : Sink & ) → typename Sink
function [source]
function [source]
replay

Replay an already-lowered child into a sink.

Queries — Fields 6 types
BoolField 2 members

A flag on an entity, named for the expression and read through a function pointer rather than a member pointer so the same descriptor works for a field computed from several tmux tokens.

BoolFieldHandle 1 members

The value a flag's name resolves to in an expression.

NumberField 2 members

A numeric field on an entity, read as a number rather than as the text tmux sends, so 9 orders before 10.

NumberFieldHandle 1 members

The value a numeric field name resolves to in an expression, whose comparison operators build the node rather than comparing anything.

StringField 2 members

A field is a named accessor: the name is what a future tmux-format lowering needs, the accessor is what in-memory evaluation needs.

StringFieldHandle 5 members

A typed field handle.

Queries — Operators 5 types
StringOp 5 members

How a text field is compared. iequals folds case; the rest do not.

NumberOp 6 members

tmux renders a count, a size and an index as text.

Combine 2 members

Whether a group's operands must all hold or any one of them.

Quantifier 4 members

How a filter applies across a relation.

Negation 1 members

One expression inverted.

Queries — Expressions 2 types, 1 function or constant
FilterExpr 4 members

A filter over one entity type, as a value.

LoweredNode 9 members

One node of a filter after it has been reduced to what tmux's -f format language can express.

LoweredExpression : std::vector< LoweredNode >
typealias [source]
typealias [source]
LoweredExpression

A whole lowered filter, flat: children are referenced by index rather than owned, so the vector can be walked without recursion.

Snapshots 2 types, 6 functions and constants
Snapshot 8 members

Owning row storage, shared by every entity taken from it.

CommandRuntimeSnapshot 8 members

A lock-consistent instant; values may change immediately after it is read.

capture_lines ( typename Text , Text && ) → typename Text ( output : std::string_view ) → std::vector< std::string_view >
functionoverload2 overloads [source]
functionoverload2 overloads [source]
capture_lines

The lines are views into the text, so text that dies at the semicolon takes them with it — and pane.capture() returns its output by value, which makes capture_lines(*pane.capture()) the natural thing to write and a use-after-free to run.

Deleted for an rvalue string only: an lvalue string converts as before, and so does a literal.

decode_value ( begin : char * , size : std::size_t ) → std::size_t
function [source]
function [source]
decode_value

Undo that escaping, in place.

Escaping only ever lengthens, so the decoded bytes fit where the encoded ones were: the write cursor never overtakes the read cursor, nothing moves, and nothing is allocated. Answers the decoded length.

An escape marker followed by anything else is left as written. Output this library asked for contains no such sequence, and failing on one would mean a recording could not carry a literal ␛.

format_request ( fields : std::span< const std::string_view > ) → std::string
function [source]
function [source]
format_request

Build the format argument for one entity's fields, terminating every field so a trailing empty value is still a value rather than a missing column.

The two substitutions nest rather than run in sequence, because tmux applies the inner one to the raw value and the outer one to its result. In that order a value already holding the escape marker is neutralised before the separator pass can produce one; reversed, the two become indistinguishable.

#{s/…/…/:…} predates every tmux this library supports, and neither character is a regular-expression metacharacter.

Unconditional, rather than applied only to the fields that could carry a separator. Expanding the substitutions costs about 0.32us per row — a 61-row listing pays 19us, against a process launch of some milliseconds — and a per-field exemption list is a thing to get wrong later, once, silently.

output_confirms ( captured : std::string_view , wanted : std::string_view , sent : const std::vector< std::string > & = {} ) → bool
function [source]
function [source]
output_confirms
split_row ( line : std::string_view , fields : std::size_t , values : std::vector< std::string_view > & ) → bool
function [source]
function [source]
split_row

Split one tmux output line into its field values.

The trailing separator emitted by format_request produces one empty tail element, which is dropped; a short or long row is reported rather than padded so a format-name typo cannot masquerade as an empty field.

without_trailing_blanks ( lines : std::vector< std::string_view > ) → std::vector< std::string_view >
function [source]
function [source]
without_trailing_blanks

Drop the blank rows a pane pads its height with, keeping blank lines that have content below them.

Requests 2 types
CommandRequest 8 members

One tmux command as argv, with no shell between it and tmux.

ControlRequest 1 members

The commands sent as one group, which tmux runs until one fails.

Errors 9 types, 9 functions and constants
CardinalityError 2 members

Why a lookup that required exactly one match did not get one.

KeyError 2 members

Why a key name could not be resolved to something tmux accepts.

LookupParseError 3 members

Why a legacy lookup string could not be read.

SocketError 4 members

Why a socket name or path was rejected before any server was contacted.

TargetError 2 members

Why a target could not be built from a name.

VersionError 2 members

Why a tmux version string could not be read.

ProtocolError 2 members

Why a control operation stopped.

is_validation_reason : typename Reason
attribute [source]
attribute [source]
is_validation_reason
is_validation_reason<CardinalityError> : bool
attribute [source]
attribute [source]
is_validation_reason<CardinalityError>
is_validation_reason<KeyError> : bool
attribute [source]
attribute [source]
is_validation_reason<KeyError>
is_validation_reason<LookupParseError> : bool
attribute [source]
attribute [source]
is_validation_reason<LookupParseError>
is_validation_reason<SocketError> : bool
attribute [source]
attribute [source]
is_validation_reason<SocketError>
is_validation_reason<TargetError> : bool
attribute [source]
attribute [source]
is_validation_reason<TargetError>
is_validation_reason<VersionError> : bool
attribute [source]
attribute [source]
is_validation_reason<VersionError>
as_command_failure ( error : ProtocolError ) → CommandFailure ( typename Reason , reason : Reason ) → typename Reason
functionoverload2 overloads [source]
functionoverload2 overloads [source]
as_command_failure
as_protocol_error ( failure : CommandFailure ) → ProtocolError
function [source]
function [source]
as_protocol_error
Constants and enums 11 types, 1 function or constant
BackendKind 3 members

How commands reach the server: by spawning a process, or through a backend the caller supplied.

FailureKind 11 members

Why a command did not produce an answer, in the order a caller would diagnose them: bad before it left, then how it left, then what came back.

NotificationKind 26 members

What a notification is, once its name and arguments have been read.

CaptureOptions 7 members

Which part of a pane's screen and scrollback a capture reads.

ConnectionOptions 9 members

How to start a control-mode connection, and what it is allowed to buffer.

ControlRequestResult 2 members

What one request produced: its reply blocks, and the connection error that ended the exchange if one did.

SplitOptions 8 members

What a creation command can be told.

typealias [source]
typealias [source]
Event

Anything the parser produces: a reply to something asked, or something tmux said on its own.

The two arrive interleaved on one stream.

Constants and enums — Session 1 type
NewSessionOptions 7 members

What a new session is created as, including its first window.

Constants and enums — Window 1 type
NewWindowOptions 7 members

What a new window is created as, and where it lands.

Testing utilities 10 types, 8 functions and constants
EnvironmentGuard 2 members

Environment variables set for the lifetime of this value and restored on destruction, including the ones that were previously unset.

ScopedTmuxServer 13 members

A tmux server that exists for the lifetime of this value.

SocketMode 2 members

Whether the test server is addressed by tmux -L name or tmux -S path.

BoolTest 2 members

A flag compared against an expected value.

NumberTest 3 members

A numeric field compared against a number.

RelationTest 4 members

A relation crosses to another entity type, so its child expression cannot live in this variant.

StringTest 3 members

A text field compared against an operand this node owns.

ScopedTmuxServerOptions 7 members

How the test server is started and how long teardown may take.

SocketNamespace 3 members

Names the private tree, the socket and the tmux -L name, so concurrent suites cannot collide and a leftover directory identifies its owner.

TeardownReport 1 members

What teardown could not clean up, so a suite can fail loudly rather than leave a server behind quietly.

LIBTMUX_REQUIRES_TMUX
constant [source]
constant [source]
LIBTMUX_REQUIRES_TMUX

Skip unless tmux is at least major.minor, naming what is missing below it.

LIBTMUX_SKIP_TMUX_DEFECT
constant [source]
constant [source]
LIBTMUX_SKIP_TMUX_DEFECT

Skip while tmux is inside a closed range of releases with a known defect.

Both ends are inclusive, and last is the newest release still affected — so a fix in 3.6 is written as a window ending at 3.5.

current_environment ( ) → std::vector< std::string >
function [source]
function [source]
current_environment

Build and edit a NAME=VALUE block for a child process.

current_environment copies this process's; set_environment replaces any existing entry rather than appending; erase_environment removes every entry for the name.

describe_running_tmux ( tmux_binary : const std::filesystem::path & = "tmux" ) → std::string
function [source]
function [source]
describe_running_tmux

What tmux -V printed, verbatim, or "unknown".

erase_environment ( environment : std::vector< std::string > & , name : std::string_view ) → void
function [source]
function [source]
erase_environment
running_tmux ( tmux_binary : const std::filesystem::path & = "tmux" ) → Version
function [source]
function [source]
running_tmux

Resolved once per distinct binary and cached.

A tmux that cannot be run or whose version cannot be parsed reports as the newest possible version, so version-gated tests run and fail rather than silently skipping.

same_socket_inode ( left : const std::filesystem::path & , right : const std::filesystem::path & ) → libtmux::expected< bool, std::string >
function [source]
function [source]
same_socket_inode
set_environment ( environment : std::vector< std::string > & , name : std::string_view , value : std::string_view ) → void
function [source]
function [source]
set_environment
Internal 14 functions and constants
bad_expected_access : typename Error
typealias [source]
typealias [source]
bad_expected_access

What value() throws when there is none.

Named here so a caller who wants an exception at a boundary can catch it in either standard's build.

expected : typename Value
typealias [source]
typealias [source]
expected

A value or the reason there is not one.

std::expected where the standard library has it, and a drop-in otherwise, so a caller writes the same code either way. Nothing in this library throws to report a tmux failure.

unexpected_t : typename Error
typealias [source]
typealias [source]
unexpected_t

The error side of expected , named for the rare declaration that has to spell it.

Returning one is how a function reports a failure.

LIBTMUX_ABI_NAMESPACE
constant [source]
constant [source]
LIBTMUX_ABI_NAMESPACE
LIBTMUX_NAMESPACE_BEGIN
constant [source]
constant [source]
LIBTMUX_NAMESPACE_BEGIN
LIBTMUX_NAMESPACE_END
constant [source]
constant [source]
LIBTMUX_NAMESPACE_END
is_word_byte ( byte : unsigned char ) → bool
function [source]
function [source]
is_word_byte
mask_whole_occurrences ( text : std::string_view , echo : std::string_view ) → std::string
function [source]
function [source]
mask_whole_occurrences
same_entity_id ( scoped_by_session : bool , left_id : std::string_view , left_session_id : std::string_view , right_id : std::string_view , right_session_id : std::string_view ) → bool
function [source]
function [source]
same_entity_id
server_over ( backend : std::shared_ptr< const Backend > ) → Server
function [source]
function [source]
server_over

Declared so the private constructor has exactly one way in.

Defined in a header this package does not install.

to_flag ( text : std::string_view ) → bool
function [source]
function [source]
to_flag

tmux renders flag formats as "1" or "0"; anything else is not the flag.

to_number ( text : std::string_view ) → long long
function [source]
function [source]
to_number

tmux renders every value as text.

These read the three shapes it uses, and answer zero, false or the epoch for a value it did not render — which within the supported version range means tmux had nothing to say, not that the token was unknown.

to_time ( text : std::string_view ) → std::chrono::sys_seconds
function [source]
function [source]
to_time
unexpected ( typename Error , error : Error && ) → typename Error
function [source]
function [source]
unexpected

A factory rather than an alias: an alias template cannot deduce its argument, so unexpected(error) would stop compiling at every call site.

Other 5 types, 1 function or constant
Chain 9 members

Several commands built up and sent as one tmux invocation.

NodeCollector 11 members

Collects a lowered expression.

Row 3 members

The storage every entity has, in one place: the snapshot that owns the bytes and which of its rows this entity is.

DeliveryStatus 4 members

How far a command is known to have got before something stopped it.

path_component ( name : std::string_view ) → expected< std::string, TargetError >
function [source]
function [source]
path_component

Validate one path component.

Ids skip validation because they contain no separator by construction.

By module 20 modules

Esc

Type to search.