1737 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 13 types, 1 function or constant
Whether an AccessRule names an operating-system user or group.
One entry of the server's access list.
A cloneable handle to one captured tmux server endpoint.
What came of waiting on a wait-for channel.
One of tmux's interactive choosers.
A consuming builder for one inert Server handle.
One session and everything under it, from Server::hierarchy .
One window and its panes, from Server::hierarchy .
Typed filter handles for SessionTree .
Typed filter handles for WindowTree .
One line of a Server::display_menu menu.
Which tmux daemon is answering on an endpoint.
The structural identity of one tmux server endpoint.
Session 3 types
One tmux session, together with the snapshot it was discovered with.
Where a new window goes, relative to the index it is given.
A session name tmux can address.
Window 4 types
One tmux window, as reached through one session that links it.
What to do about a process still running where one is being respawned.
How much space a new pane gets.
One window and the panes it should contain.
Pane 4 types
One tmux pane, as reached through one window link.
What came of waiting for a pane to do something.
Which way to move focus among a window's panes.
One pane.
Client 1 type
One client attached to the tmux server.
Hooks 1 type, 1 function or constant
The values one array option holds, by the index tmux stores them under.
- IndexedHooks : SparseValues<TmuxText>
-
The commands one hook name holds.
A hook is an array option whose values are tmux commands, so this is the
SparseValuesof that shape rather than a type of its own.Examples
use libtmux::{IndexedHooks, ReplaceMode, TmuxText};use std::collections::BTreeMap;let guard = libtmux::test::TestServer::new().await?;let server = guard.server();// The indices are tmux's own and are sparse: removing one does not renumber// the rest, so the map is keyed rather than positional.let mut entries = BTreeMap::new();entries.insert(0, TmuxText::from("display-message first"));entries.insert(4, TmuxText::from("display-message fifth"));server.set_hooks("after-new-window", &IndexedHooks::from(entries), ReplaceMode::Replace).await?;let hooks: IndexedHooks = server.hook("after-new-window").await?.expect("just written");assert_eq!(hooks.len(), 2);assert_eq!(hooks.indices().copied().collect::<Vec<_>>(), vec![0, 4]);guard.shutdown().await?;
Options 4 types
Which table an option primarily lives in.
What tmux declares about one option.
Why a typed option write was refused before it reached tmux.
One option's value, typed by what tmux's own option table declares.
Options — Functions 1 function or constant
- option_schema ( name : &str ) Option<&'static OptionSchema>
-
Look up what tmux declares about one option.
An option tmux does not declare, such as a user option beginning with
@, returnsNone: it has no type beyond the text stored in it.The name may carry an array index, as
after-new-window[0]does, which is ignored for the lookup because every element of an array option shares one type.Examples
use libtmux::{OptionKind, option_schema};// `status` looks like a flag but accepts on, off, and 2 through 5, so// tmux declares it a choice. The schema records that rather than guessing.assert_eq!(option_schema("status").map(|o| o.kind()), Some(OptionKind::Choice));assert_eq!(option_schema("mouse").map(|o| o.kind()), Some(OptionKind::Flag));assert_eq!(option_schema("history-limit").map(|o| o.kind()), Some(OptionKind::Number));assert_eq!(option_schema("after-new-window[0]").map(|o| o.kind()), Some(OptionKind::Command));assert_eq!(option_schema("@mine"), None);
Options — Constants and variables 217 functions and constants
-
tmux's
activity-actionoption.
-
tmux's
after-bind-keyoption.
-
tmux's
after-capture-paneoption.
-
tmux's
after-copy-modeoption.
-
tmux's
after-display-messageoption.
-
tmux's
after-display-panesoption.
-
tmux's
after-kill-paneoption.
-
tmux's
after-list-buffersoption.
-
tmux's
after-list-clientsoption.
-
tmux's
after-list-keysoption.
-
tmux's
after-list-panesoption.
-
tmux's
after-list-sessionsoption.
-
tmux's
after-list-windowsoption.
-
tmux's
after-load-bufferoption.
-
tmux's
after-lock-serveroption.
-
tmux's
after-new-sessionoption.
-
tmux's
after-new-windowoption.
-
tmux's
after-paste-bufferoption.
-
tmux's
after-pipe-paneoption.
-
tmux's
after-queueoption.
-
tmux's
after-refresh-clientoption.
-
tmux's
after-rename-sessionoption.
-
tmux's
after-rename-windowoption.
-
tmux's
after-resize-paneoption.
-
tmux's
after-resize-windowoption.
-
tmux's
after-save-bufferoption.
-
tmux's
after-select-layoutoption.
-
tmux's
after-select-paneoption.
-
tmux's
after-select-windowoption.
-
tmux's
after-send-keysoption.
-
tmux's
after-set-bufferoption.
-
tmux's
after-set-environmentoption.
-
tmux's
after-set-hookoption.
-
tmux's
after-set-optionoption.
-
tmux's
after-show-environmentoption.
-
tmux's
after-show-messagesoption.
-
tmux's
after-show-optionsoption.
-
tmux's
after-split-windowoption.
-
tmux's
after-unbind-keyoption.
-
tmux's
aggressive-resizeoption.
-
tmux's
alert-activityoption.
-
tmux's
alert-belloption.
-
tmux's
alert-silenceoption.
-
tmux's
allow-passthroughoption.
-
tmux's
allow-renameoption.
-
tmux's
allow-set-titleoption.
-
tmux's
alternate-screenoption.
-
tmux's
assume-paste-timeoption.
-
tmux's
automatic-renameoption.
-
tmux's
automatic-rename-formatoption.
-
tmux's
backspaceoption.
-
tmux's
base-indexoption.
-
tmux's
bell-actionoption.
-
tmux's
buffer-limitoption.
-
tmux's
client-activeoption.
-
tmux's
client-attachedoption.
-
tmux's
client-dark-themeoption.
-
tmux's
client-detachedoption.
-
tmux's
client-focus-inoption.
-
tmux's
client-focus-outoption.
-
tmux's
client-light-themeoption.
-
tmux's
client-resizedoption.
-
tmux's
client-session-changedoption.
-
tmux's
clock-mode-colouroption.
-
tmux's
clock-mode-styleoption.
-
tmux's
codepoint-widthsoption.
-
tmux's
command-aliasoption.
-
tmux's
command-erroroption.
-
tmux's
copy-commandoption.
-
tmux's
copy-mode-current-line-number-styleoption.
-
tmux's
copy-mode-current-match-styleoption.
-
tmux's
copy-mode-line-number-styleoption.
-
tmux's
copy-mode-line-numbersoption.
-
tmux's
copy-mode-mark-styleoption.
-
tmux's
copy-mode-match-styleoption.
-
tmux's
copy-mode-position-formatoption.
-
tmux's
copy-mode-position-styleoption.
-
tmux's
copy-mode-selection-styleoption.
-
tmux's
cursor-colouroption.
-
tmux's
cursor-styleoption.
-
tmux's
default-client-commandoption.
-
tmux's
default-commandoption.
-
tmux's
default-shelloption.
-
tmux's
default-sizeoption.
-
tmux's
default-terminaloption.
-
tmux's
destroy-unattachedoption.
-
tmux's
detach-on-destroyoption.
-
tmux's
display-panes-active-colouroption.
-
tmux's
display-panes-colouroption.
-
tmux's
display-panes-timeoption.
-
tmux's
display-timeoption.
-
tmux's
editoroption.
-
tmux's
escape-timeoption.
-
tmux's
exit-emptyoption.
-
tmux's
exit-unattachedoption.
-
tmux's
extended-keysoption.
-
tmux's
extended-keys-formatoption.
-
tmux's
fill-characteroption.
-
tmux's
focus-eventsoption.
-
tmux's
focus-follows-mouseoption.
-
tmux's
get-clipboardoption.
-
tmux's
history-fileoption.
-
tmux's
history-limitoption.
-
tmux's
initial-repeat-timeoption.
-
tmux's
input-buffer-sizeoption.
-
tmux's
key-tableoption.
-
tmux's
lock-after-timeoption.
-
tmux's
lock-commandoption.
-
tmux's
main-pane-heightoption.
-
tmux's
main-pane-widthoption.
-
tmux's
menu-border-linesoption.
-
tmux's
menu-border-styleoption.
-
tmux's
menu-selected-styleoption.
-
tmux's
menu-styleoption.
-
tmux's
message-command-styleoption.
-
tmux's
message-formatoption.
-
tmux's
message-limitoption.
-
tmux's
message-lineoption.
-
tmux's
message-styleoption.
-
tmux's
mode-keysoption.
-
tmux's
mode-styleoption.
-
tmux's
monitor-activityoption.
-
tmux's
monitor-belloption.
-
tmux's
monitor-silenceoption.
-
tmux's
mouseoption.
-
tmux's
other-pane-heightoption.
-
tmux's
other-pane-widthoption.
-
tmux's
pane-active-border-styleoption.
-
tmux's
pane-base-indexoption.
-
tmux's
pane-border-formatoption.
-
tmux's
pane-border-indicatorsoption.
-
tmux's
pane-border-linesoption.
-
tmux's
pane-border-statusoption.
-
tmux's
pane-border-styleoption.
-
tmux's
pane-coloursoption.
-
tmux's
pane-diedoption.
-
tmux's
pane-exitedoption.
-
tmux's
pane-focus-inoption.
-
tmux's
pane-focus-outoption.
-
tmux's
pane-mode-changedoption.
-
tmux's
pane-scrollbarsoption.
-
tmux's
pane-scrollbars-positionoption.
-
tmux's
pane-scrollbars-styleoption.
-
tmux's
pane-set-clipboardoption.
-
tmux's
pane-status-current-styleoption.
-
tmux's
pane-status-styleoption.
-
tmux's
pane-title-changedoption.
-
tmux's
popup-border-linesoption.
-
tmux's
popup-border-styleoption.
-
tmux's
popup-styleoption.
-
tmux's
prefixoption.
-
tmux's
prefix-timeoutoption.
-
tmux's
prefix2option.
-
tmux's
prompt-command-cursor-styleoption.
-
tmux's
prompt-cursor-colouroption.
-
tmux's
prompt-cursor-styleoption.
-
tmux's
prompt-history-limitoption.
-
tmux's
remain-on-exitoption.
-
tmux's
remain-on-exit-formatoption.
-
tmux's
renumber-windowsoption.
-
tmux's
repeat-timeoption.
-
tmux's
scroll-on-clearoption.
-
tmux's
session-closedoption.
-
tmux's
session-createdoption.
-
tmux's
session-renamedoption.
-
tmux's
session-status-current-styleoption.
-
tmux's
session-status-styleoption.
-
tmux's
session-window-changedoption.
-
tmux's
set-clipboardoption.
-
tmux's
set-titlesoption.
-
tmux's
set-titles-stringoption.
-
tmux's
silence-actionoption.
-
tmux's
statusoption.
-
tmux's
status-bgoption.
-
tmux's
status-fgoption.
-
tmux's
status-formatoption.
-
tmux's
status-intervaloption.
-
tmux's
status-justifyoption.
-
tmux's
status-keysoption.
-
tmux's
status-leftoption.
-
tmux's
status-left-lengthoption.
-
tmux's
status-left-styleoption.
-
tmux's
status-positionoption.
-
tmux's
status-rightoption.
-
tmux's
status-right-lengthoption.
-
tmux's
status-right-styleoption.
-
tmux's
status-styleoption.
-
tmux's
synchronize-panesoption.
-
tmux's
terminal-featuresoption.
-
tmux's
terminal-overridesoption.
-
tmux's
tiled-layout-max-columnsoption.
-
tmux's
tree-mode-preview-formatoption.
-
tmux's
tree-mode-preview-styleoption.
-
tmux's
update-environmentoption.
-
tmux's
user-keysoption.
-
tmux's
variation-selector-always-wideoption.
-
tmux's
visual-activityoption.
-
tmux's
visual-belloption.
-
tmux's
visual-silenceoption.
-
tmux's
window-active-styleoption.
-
tmux's
window-linkedoption.
-
tmux's
window-pane-current-status-formatoption.
-
tmux's
window-pane-status-formatoption.
-
tmux's
window-sizeoption.
-
tmux's
window-status-activity-styleoption.
-
tmux's
window-status-bell-styleoption.
-
tmux's
window-status-current-formatoption.
-
tmux's
window-status-current-styleoption.
-
tmux's
window-status-formatoption.
-
tmux's
window-status-last-styleoption.
-
tmux's
window-status-separatoroption.
-
tmux's
window-status-styleoption.
-
tmux's
window-styleoption.
-
tmux's
window-unlinkedoption.
-
tmux's
word-separatorsoption.
-
tmux's
wrap-searchoption.
-
tmux's
xterm-keysoption.
Keys and bindings 1 type
One key binding, as tmux holds it.
Layout and geometry 5 types
Where a split puts the new pane, relative to the one being divided.
One of the pane arrangements tmux knows by name.
What to arrange a window's panes as.
Where a split puts the pane it makes.
Which edge a resize moves.
Environment 1 type
What a session's environment holds for one name.
Terminal capabilities 1 type
Immutable capability state detected for one configured tmux executable.
Versions 3 types, 11 functions and constants
The suffix of a numbered tmux release.
A numbered tmux release.
A parsed raw tmux version.
- CAPTURE_LINE_FLAGS : ReleaseVersion
-
capture-pane -F, and socrate::Pane::capture_lines.
- CAPTURE_TRIM_BLANK_CELLS : ReleaseVersion
-
capture-pane -T, and socrate::CaptureOptions::trim_blank_cells.Added in 3.4 to stop at the last used cell instead of the pane's full width. The option string is
ab:CeE:JNpPqS:t:on 3.2a and gainsTby 3.5a; tmux's own CHANGES puts it in the 3.3a-to-3.4 section.-Nand-Pneed no such gate: both are present at 3.2a, which iscrate::TmuxVersion::MIN_SUPPORTED.
- CLIENTS_HIDE_STOPPED : ReleaseVersion
-
list-clientsleaving out a client that is stopped rather than gone, and socrate::Error::ClientSuspendedbeing reachable at all.From this release
sort_get_clientsscreens the listing onCLIENT_UNATTACHEDFLAGS, which covers the dead, the exiting and the suspended together, so a suspended or locked client disappears from it. Earlier releases screen on the session alone, and suspending a client never clears that, so it stays listed and reads back normally.Measured on 3.2a, 3.4, 3.5a, 3.6b, 3.7 and 3.7c: the first four list a suspended client, the last two do not.
- CONTROL_PANE_OFF : ReleaseVersion
-
Taking a pane out of a control client's stream without crashing the server, and so
crate::control::ControlSender::mute_paneusingoff.Before this release `refresh-client -A <pane>:off
leaves the output blocks already queued for that pane in place, while the pane stops holding the server's read buffer back. Writing those blocks later reads past the end of a buffer the server has drained, and the server segfaults.mute_pane` pauses the pane below this release instead, which discards the queue on every supported release.
- JSON_LAYOUTS : ReleaseVersion
-
window_layoutandselect-layoutusing a JSON subset instead of the classic checksum-prefixed string, and socrate::LayoutSpec::Savedaccepting one.tmux's own
CHANGES FROM 3.7c TO 3.8names the release: "Layout strings now use a JSON subset format ... The old format is still accepted; control mode clients receive old layouts unless they set the new-layouts flag." Below this release a JSON string is refused as an unrecognised layout, with no hint that the value is simply from a newer tmux.
- LIST_KEYS_FORMAT : ReleaseVersion
-
list-keys -F, and socrate::Server::typed_key_bindings.Below this release
list-keysprints only its ownbind-keylines, which quote a key and leave a table name bare, and carry no note.
- MIRRORED_LAYOUTS : ReleaseVersion
-
The mirrored layouts, and so
crate::Layout::MainHorizontalMirroredandcrate::Layout::MainVerticalMirrored.Below this release
layout_set_lookupdoes not carry those names, and tmux refuses one as it would a typo.
- PANE_BORDER_FORMAT_PER_PANE : ReleaseVersion
-
pane-border-formatbecoming a pane option as well as a window one.Below this release tmux stores it only per window, and a write sent with
-plands there instead -- reporting success for a change the caller did not ask for. Seecrate::OptionSchema::accepts.
- PANE_BORDER_STYLE_PER_PANE : ReleaseVersion
-
pane-border-styleandpane-active-border-stylebecoming pane options as well as window ones, with the same consequence below it asPANE_BORDER_FORMAT_PER_PANE.
- PROMPT_HISTORY : ReleaseVersion
-
The prompt history, and so
crate::Server::prompt_history.
- SERVER_ACCESS : ReleaseVersion
-
server-access, and socrate::Server::access_rules.
Commands 6 types
A logical tmux command with classified diagnostic arguments.
Several tmux commands dispatched as one tmux a \; b invocation.
A rendering of a dispatched command that is safe to log.
How much work one server may have in flight at once.
Text bound for a tmux argument that tmux expands as a format.
One command typed into a pane, with tmuxp's per-command settings.
Control mode 6 types, 2 functions and constants
What a subscription watches.
Sends commands down a control-mode connection.
Receives tmux notifications and terminal connection errors.
What one pane writes, as it writes it.
How many persistent control-mode clients one server may hold.
What one control-mode connection may accumulate before it gives up.
-
Frame arbitrary control-mode output into replies, and check each reply.
The first byte sets the line budget and how many requests are queued; the next byte per request says how many commands it chained and whether its caller has gone. The rest is what tmux wrote. Lines are read the way the connection actor reads them, and every closed block goes to the actor's reply slots.
Panics
When a line inside a block is anything but output or that block's own terminator, or when a reply holds other than the blocks it was owed: the next ones in order, stopping at the first failure.
-
Parse one control-mode protocol line, for fuzzing only.
The parser is the crate's most exposed surface: it reads bytes from a process that keeps running, and every other decoder sits behind a tmux command that ended. Nothing here is a supported API -- it exists so a fuzzer can reach
Line::parsewithout it becoming public -- and it is gated behind a feature no release turns on.
Formats 1 type, 2 functions and constants
Immutable text bytes returned by tmux.
-
Decode arbitrary listing output, then check that decoding inverts tmux.
The first byte picks a listing and a tmux release. The rest is decoded as that listing's stdout, and then, split at NUL, read as field values that are written the way that release prints them and decoded again.
Panics
When a value tmux could print does not decode to itself.
-
Escape text so tmux uses it as written rather than expanding it.
tmux runs its format machinery over more than names:
#(command)runscommandin a shell and#{session_id}becomes the id, in a session or window name and in the start directory-cnames alike. Doubling#is what tmux's parser reads as one literal#, so the text arrives as itself -- which also makes a directory whose name really contains#reachable, where passing it through unescaped does not.Every typed argument that tmux expands takes
TmuxArg, which applies this on conversion, so a caller reaches for this directly only when building a rawcrate::Commandof their own.Examples
use std::ffi::OsString;use libtmux::escape_format;// Text that would otherwise run a command.assert_eq!(escape_format("#(id)"), OsString::from("##(id)"));// Ordinary text is unchanged.assert_eq!(escape_format("editor"), OsString::from("editor"));
Queries 9 types, 8 functions and constants
A predicate that evaluates a borrowed candidate.
Cardinality and named-predicate operations for native iterators.
Stable string semantics for a custom enum filter field.
A type with a stable schema that can evaluate portable filter predicates.
A value-only handle for a to-many relation from From to To.
A value-only handle for a to-one relation from From to To.
A filter target whose portable expression grammar can be described.
One target and every field its decoder accepts.
The value or relation family behind one filter field.
-
Construct a boolean handle for generated code.
Examples
use libtmux::query::BoolField;use libtmux::query::__private;struct Row;let field: BoolField<Row> = __private::bool_field("row", "done");assert!(format!("{field:?}").contains("done"));
-
Construct a custom enum handle for generated code.
Examples
use libtmux::query::{EnumField, FilterEnum};use libtmux::query::__private;enum State { Ready }impl FilterEnum for State {const FILTER_VARIANTS: &'static [&'static str] = &["ready"];fn filter_name(&self) -> &'static str { "ready" }}struct Row;let field: EnumField<Row, State> = __private::enum_field("row", "state");assert!(format!("{field:?}").contains("state"));
- filter_schema ( ) FilterSchemaDescriptor
-
Return generated metadata for one related target.
- integer_field ( target : &'static str , field : &'static str ) IntegerField<T, N>
-
Construct an integer handle for generated code.
Examples
use libtmux::query::IntegerField;use libtmux::query::__private;struct Row;let field: IntegerField<Row, i64> = __private::integer_field("row", "count");assert!(format!("{field:?}").contains("count"));
- many_relation ( target : &'static str , field : &'static str ) ManyRelation<From, To>
-
Construct a to-many relation handle for generated code.
Examples
use libtmux::query::ManyRelation;use libtmux::query::__private;struct Parent;struct Child;let field: ManyRelation<Parent, Child> =__private::many_relation("parent", "children");assert!(format!("{field:?}").contains("children"));
- one_relation ( target : &'static str , field : &'static str ) OneRelation<From, To>
-
Construct a to-one relation handle for generated code.
Examples
use libtmux::query::OneRelation;use libtmux::query::__private;struct Parent;struct Owner;let field: OneRelation<Parent, Owner> = __private::one_relation("parent", "owner");assert!(format!("{field:?}").contains("owner"));
-
Construct a text handle for generated code.
Examples
use libtmux::query::{TextField};use libtmux::query::__private;struct Row;let field: TextField<Row> = __private::text_field("row", "name");assert!(format!("{field:?}").contains("name"));
- unknown_field_error ( ) FilterExpressionError
-
Construct the source-less generated fallback for an unknown field.
Examples
use libtmux::query::FilterExpressionErrorKind;use libtmux::query::__private;let error = __private::unknown_field_error();assert_eq!(error.kind(), FilterExpressionErrorKind::UnknownField);
Queries — Fields 6 types
A typed handle for a portable text field on T.
A typed handle for a portable boolean field on T.
A typed handle for a fixed-width integer field N on T.
A typed handle for a custom enum field E on T.
One accepted field and the predicates valid for it.
A field handle whose value a Target snapshot holds.
Queries — Expressions 2 types
An opaque, portable predicate over candidates of type T.
One opaque predicate passed to generated candidate dispatch.
Snapshots 5 types
One line of a capture, with what tmux knows about it.
Read a pane's contents.
A snapshot field's value, or the reason the snapshot holds none.
Closed progress-state vocabulary tmux emits for a pane's progress bar.
Keeps super::ReadField implemented by this crate's handles only.
Workspaces 7 types
What an operation does to tmux state.
How an operation directly affects tmux objects.
Set a tmux option.
Set a variable in a session's environment.
Send text or named keys to a pane.
Wait before the next operation runs.
Rearrange a window's panes into a named or described layout.
Workspaces — Plans 5 types
Operations recorded but not yet run.
How a plan is grouped into tmux invocations.
Compiles the workspace README's examples, and nothing else.
One workspace: a session and the windows it should contain.
Creates tmux sessions from workspace configurations.
Workspaces — Steps 10 types
An operation that can be recorded in a Plan .
An operation that may share one tmux invocation with its neighbours.
Turns a recorded step index into whatever Plan::add returns for it.
One tmux invocation: the operations it carries, in order.
Why a Step is its own tmux invocation.
How an operation ended.
How much a run could tell about each operation's outcome.
The typed value one operation produced.
What one recorded operation produced, in plan order.
What one dispatched invocation produced.
Workspaces — Targets and slots 8 types
The tmux object an operation addresses or makes.
A typed reference to the object a recorded operation will create.
Marker for a slot that points at a session.
Marker for a slot that points at a window.
Marker for a slot that points at a pane.
A -t target naming a pane, resolved when the plan runs.
A -t target naming a window, resolved when the plan runs.
A -t target naming a session, resolved when the plan runs.
Workspaces — Session 1 type
Create a session.
Workspaces — Window 5 types
Split a window, making a pane.
Create a window in a session.
Make a window the active one.
Rename a window.
Destroy a window.
Workspaces — Pane 2 types
Make a pane the active one.
Destroy a pane.
Errors 14 types
Why a control-mode connection failed.
Which way tmux would not accept an option.
A coarse failure category for reporting and routing.
An invalid scope-specific tmux object ID.
An error returned by libtmux.
The kind of tmux object a failure refers to.
Payload-free metadata describing why tmux output could not be decoded.
A scoped resource's creation, operation, or cleanup failure.
An invalid dependency between two plan steps, or a step whose own arguments cannot render as one tmux command.
The ways an iterator can fail to contain exactly one item.
An error indicating that an iterator contained more than one item.
A source-less, value-free portable expression validation error.
A workspace configuration failure.
A failure while building a workspace.
Errors — Server 2 types
The category of an invalid crate::ServerBuilder configuration.
Which way a tmux server was not there.
Errors — Session 1 type
Why a session name is one tmux could not address.
Constants and enums 15 types
The exact status and output captured for one tmux command.
Something tmux reported that no command asked for.
The outcome of one command sent over control mode.
One control-mode connection to a tmux server.
Whether writing a hook keeps the entries it does not name.
What kind of value an option holds.
How far back a capture reaches, and in what form.
Why a plan dependency is invalid.
What running a plan produced.
The category of an invalid portable filter expression.
The fixed-width integer types understood by generated schema checks.
How much a user on the server's access list may do.
Which prompt tmux is remembering answers for.
Where a pane lands when it is moved into another window.
Options for splitting a window or pane into a new pane.
Constants and enums — Session 1 type
Options for creating a session.
Constants and enums — Window 1 type
Options for creating a window in a session.
Testing utilities 6 types, 4 functions and constants
The category of a TestServer lifecycle failure.
A source-less, redacted failure from TestServer .
A consuming builder for an isolated foreground tmux test server.
One isolated tmux daemon and its descriptor-relative cleanup guard.
Whether a fixture's tmux daemon is still running, and how it ended if not.
A condition did not hold before its deadline.
- reap_abandoned_servers ( older_than : Duration ) Result<Vec<PathBuf>, TestServerError>
-
Kill tmux servers left behind by fixtures that never cleaned up.
A
TestServerremoves its own daemon and directory. One whose process was killed mid-run cannot, and the daemon it left keeps running: each holds a pseudo-terminal for every pane it has, and a system has a few thousand. Enough abandoned runs and the nextforkfails withNo space left on device, which reads as a bug in whatever ran next.Only this crate's own fixtures are considered: a directory under
/tmp/libtmux-rs-test, owned by this user, holding a socket where a fixture puts one. A tmux server started any other way -- including one belonging to another libtmux on the same machine -- is never touched, so this cannot reach a real session.Abandonment is read from the process that made the fixture, not guessed from a timestamp: each one records its owner, and a fixture is only reaped once that process is gone. A recycled process id makes this skip a leftover rather than reap a live one, which is the direction to fail in.
older_thanis a second guard on top, for a fixture whose owner id has been reused; passDuration::ZEROto rely on the owner check alone.Errors
Returns an error when the temporary root cannot be read. A directory that cannot be reaped is skipped rather than failing the sweep, because one unreadable leftover should not stop the rest being cleared.
Examples
use std::time::Duration;// Nothing this old is in use, so nothing a running test owns is at risk.let reaped = libtmux::test::reap_abandoned_servers(Duration::from_secs(3600))?;println!("reaped {} abandoned fixtures", reaped.len());
- retry_until ( within : Duration , condition : impl AsyncFnMut() -> bool ) Result<(), RetryTimeout>
-
Poll until a condition holds, or the deadline passes.
tmux applies most changes asynchronously, so a test that reads straight back can observe the state before the change. This waits for the state the test is about rather than sleeping a fixed amount, which is both faster and not tied to how loaded the machine is.
Errors
Returns
RetryTimeoutwhen the condition did not hold before the deadline. The condition's own errors are its business; returnfalseto keep waiting.Examples
use std::time::Duration;use libtmux::test::retry_until;let mut polls = 0;retry_until(Duration::from_secs(5), async || {polls += 1;polls >= 3}).await?;assert_eq!(polls, 3);Discussed in Sending keys , Testing with libtmux · Pane interaction , Waiting and retrying
-
Widen a fixture deadline by
LIBTMUX_TEST_TIMEOUT_SCALE.retry_untiland the fixture's own deadlines already carry this. Reach for it when a test states a deadline of its own -- waiting on something this crate does not own, say -- so that it stretches on a loaded machine like the ones around it rather than becoming the first to fire.The scale never narrows a deadline: unset, unparseable, or below
1all leavebaseas it is.Examples
use std::time::Duration;use libtmux::test::scaled;// Unset, the scale is 1 and a deadline is its own length.assert!(scaled(Duration::from_secs(5)) >= Duration::from_secs(5));
-
Build a name no other caller in this process will produce.
The name combines the prefix, the process id, and a counter. Unlike a random name it needs no collision check and no random source, and unlike a bare counter it does not collide between concurrent test processes sharing one server.
Examples
use libtmux::test::unique_name;let first = unique_name("libtmux");let second = unique_name("libtmux");assert_ne!(first, second);assert!(first.starts_with("libtmux-"));
Other 5 types
A runtime for calling this crate's async methods from ordinary code.
How many bytes one dispatch may read from each stream.
The design notes, compiled.
Compiles the libtmux-macros README's examples, and nothing else.
By module 54 modules
-
blocking 1
-
capabilities 1
-
client 1
-
command 4
-
freeze 1
-
hooks 3
-
pane 4
-
snapshot 4
-
control.fuzz 1
-
error.scoped 1
-
formats.fuzz 1
-
formats.text 1
-
mcp.caller 2
-
mcp.exec 4
-
mcp.manifest 1
-
mcp.model 20
-
mcp.resources 4
-
mcp.src 1
-
mcp.tail 1
-
options.generated 217
- ACTIVITY
_ACTION - AFTER
_BIND _KEY - AFTER
_CAPTURE _PANE - AFTER
_COPY _MODE - AFTER
_DISPLAY _MESSAGE - AFTER
_DISPLAY _PANES - AFTER
_KILL _PANE - AFTER
_LIST _BUFFERS - AFTER
_LIST _CLIENTS - AFTER
_LIST _KEYS - AFTER
_LIST _PANES - AFTER
_LIST _SESSIONS - AFTER
_LIST _WINDOWS - AFTER
_LOAD _BUFFER - AFTER
_LOCK _SERVER - AFTER
_NEW _SESSION - AFTER
_NEW _WINDOW - AFTER
_PASTE _BUFFER - AFTER
_PIPE _PANE - AFTER
_QUEUE - AFTER
_REFRESH _CLIENT - AFTER
_RENAME _SESSION - AFTER
_RENAME _WINDOW - AFTER
_RESIZE _PANE - AFTER
_RESIZE _WINDOW - AFTER
_SAVE _BUFFER - AFTER
_SELECT _LAYOUT - AFTER
_SELECT _PANE - AFTER
_SELECT _WINDOW - AFTER
_SEND _KEYS - AFTER
_SET _BUFFER - AFTER
_SET _ENVIRONMENT - AFTER
_SET _HOOK - AFTER
_SET _OPTION - AFTER
_SHOW _ENVIRONMENT - AFTER
_SHOW _MESSAGES - AFTER
_SHOW _OPTIONS - AFTER
_SPLIT _WINDOW - AFTER
_UNBIND _KEY - AGGRESSIVE
_RESIZE - ALERT
_ACTIVITY - ALERT
_BELL - ALERT
_SILENCE - ALLOW
_PASSTHROUGH - ALLOW
_RENAME - ALLOW
_SET _TITLE - ALTERNATE
_SCREEN - ASSUME
_PASTE _TIME - AUTOMATIC
_RENAME - AUTOMATIC
_RENAME _FORMAT - BACKSPACE
- BASE
_INDEX - BELL
_ACTION - BUFFER
_LIMIT - CLIENT
_ACTIVE - CLIENT
_ATTACHED - CLIENT
_DARK _THEME - CLIENT
_DETACHED - CLIENT
_FOCUS _IN - CLIENT
_FOCUS _OUT - CLIENT
_LIGHT _THEME - CLIENT
_RESIZED - CLIENT
_SESSION _CHANGED - CLOCK
_MODE _COLOUR - CLOCK
_MODE _STYLE - CODEPOINT
_WIDTHS - COMMAND
_ALIAS - COMMAND
_ERROR - COPY
_COMMAND - COPY
_MODE _CURRENT _LINE _NUMBER _STYLE - COPY
_MODE _CURRENT _MATCH _STYLE - COPY
_MODE _LINE _NUMBER _STYLE - COPY
_MODE _LINE _NUMBERS - COPY
_MODE _MARK _STYLE - COPY
_MODE _MATCH _STYLE - COPY
_MODE _POSITION _FORMAT - COPY
_MODE _POSITION _STYLE - COPY
_MODE _SELECTION _STYLE - CURSOR
_COLOUR - CURSOR
_STYLE - DEFAULT
_CLIENT _COMMAND - DEFAULT
_COMMAND - DEFAULT
_SHELL - DEFAULT
_SIZE - DEFAULT
_TERMINAL - DESTROY
_UNATTACHED - DETACH
_ON _DESTROY - DISPLAY
_PANES _ACTIVE _COLOUR - DISPLAY
_PANES _COLOUR - DISPLAY
_PANES _TIME - DISPLAY
_TIME - EDITOR
- ESCAPE
_TIME - EXIT
_EMPTY - EXIT
_UNATTACHED - EXTENDED
_KEYS - EXTENDED
_KEYS _FORMAT - FILL
_CHARACTER - FOCUS
_EVENTS - FOCUS
_FOLLOWS _MOUSE - GET
_CLIPBOARD - HISTORY
_FILE - HISTORY
_LIMIT - INITIAL
_REPEAT _TIME - INPUT
_BUFFER _SIZE - KEY
_TABLE - LOCK
_AFTER _TIME - LOCK
_COMMAND - MAIN
_PANE _HEIGHT - MAIN
_PANE _WIDTH - MENU
_BORDER _LINES - MENU
_BORDER _STYLE - MENU
_SELECTED _STYLE - MENU
_STYLE - MESSAGE
_COMMAND _STYLE - MESSAGE
_FORMAT - MESSAGE
_LIMIT - MESSAGE
_LINE - MESSAGE
_STYLE - MODE
_KEYS - MODE
_STYLE - MONITOR
_ACTIVITY - MONITOR
_BELL - MONITOR
_SILENCE - MOUSE
- OTHER
_PANE _HEIGHT - OTHER
_PANE _WIDTH - PANE
_ACTIVE _BORDER _STYLE - PANE
_BASE _INDEX - PANE
_BORDER _FORMAT - PANE
_BORDER _INDICATORS - PANE
_BORDER _LINES - PANE
_BORDER _STATUS - PANE
_BORDER _STYLE - PANE
_COLOURS - PANE
_DIED - PANE
_EXITED - PANE
_FOCUS _IN - PANE
_FOCUS _OUT - PANE
_MODE _CHANGED - PANE
_SCROLLBARS - PANE
_SCROLLBARS _POSITION - PANE
_SCROLLBARS _STYLE - PANE
_SET _CLIPBOARD - PANE
_STATUS _CURRENT _STYLE - PANE
_STATUS _STYLE - PANE
_TITLE _CHANGED - POPUP
_BORDER _LINES - POPUP
_BORDER _STYLE - POPUP
_STYLE - PREFIX
- PREFIX
_TIMEOUT - PREFIX2
- PROMPT
_COMMAND _CURSOR _STYLE - PROMPT
_CURSOR _COLOUR - PROMPT
_CURSOR _STYLE - PROMPT
_HISTORY _LIMIT - REMAIN
_ON _EXIT - REMAIN
_ON _EXIT _FORMAT - RENUMBER
_WINDOWS - REPEAT
_TIME - SCROLL
_ON _CLEAR - SESSION
_CLOSED - SESSION
_CREATED - SESSION
_RENAMED - SESSION
_STATUS _CURRENT _STYLE - SESSION
_STATUS _STYLE - SESSION
_WINDOW _CHANGED - SET
_CLIPBOARD - SET
_TITLES - SET
_TITLES _STRING - SILENCE
_ACTION - STATUS
- STATUS
_BG - STATUS
_FG - STATUS
_FORMAT - STATUS
_INTERVAL - STATUS
_JUSTIFY - STATUS
_KEYS - STATUS
_LEFT - STATUS
_LEFT _LENGTH - STATUS
_LEFT _STYLE - STATUS
_POSITION - STATUS
_RIGHT - STATUS
_RIGHT _LENGTH - STATUS
_RIGHT _STYLE - STATUS
_STYLE - SYNCHRONIZE
_PANES - TERMINAL
_FEATURES - TERMINAL
_OVERRIDES - TILED
_LAYOUT _MAX _COLUMNS - TREE
_MODE _PREVIEW _FORMAT - TREE
_MODE _PREVIEW _STYLE - UPDATE
_ENVIRONMENT - USER
_KEYS - VARIATION
_SELECTOR _ALWAYS _WIDE - VISUAL
_ACTIVITY - VISUAL
_BELL - VISUAL
_SILENCE - WINDOW
_ACTIVE _STYLE - WINDOW
_LINKED - WINDOW
_PANE _CURRENT _STATUS _FORMAT - WINDOW
_PANE _STATUS _FORMAT - WINDOW
_SIZE - WINDOW
_STATUS _ACTIVITY _STYLE - WINDOW
_STATUS _BELL _STYLE - WINDOW
_STATUS _CURRENT _FORMAT - WINDOW
_STATUS _CURRENT _STYLE - WINDOW
_STATUS _FORMAT - WINDOW
_STATUS _LAST _STYLE - WINDOW
_STATUS _SEPARATOR - WINDOW
_STATUS _STYLE - WINDOW
_STYLE - WINDOW
_UNLINKED - WORD
_SEPARATORS - WRAP
_SEARCH - XTERM
_KEYS
- ACTIVITY
-
plan.planner 3
-
query.fields 6
-
server.builder 1
-
server.discovery 4
-
server.interactive 1
-
server.keys 2
-
mcp.tools.contract 2
-
mcp.tools.error 1
-
plan.ops.options 2
-
plan.ops.panes 5
-
plan.ops.sessions 1
-
plan.ops.timing 1
-
plan.ops.windows 5