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

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
Principal 2 members

Whether an AccessRule names an operating-system user or group.

AccessRule 3 members

One entry of the server's access list.

Server 95 members

A cloneable handle to one captured tmux server endpoint.

ChannelWait 2 members

What came of waiting on a wait-for channel.

Chooser 4 members

One of tmux's interactive choosers.

ServerBuilder 10 members

A consuming builder for one inert Server handle.

SessionTree 2 members

One session and everything under it, from Server::hierarchy .

WindowTree 2 members

One window and its panes, from Server::hierarchy .

ServerGeneration 2 members

Which tmux daemon is answering on an endpoint.

ServerIdentity 0 members

The structural identity of one tmux server endpoint.

__fuzz_parse_key_bindings ( stdout : &[u8] )
function [source]
function [source]
__fuzz_parse_key_bindings

Decode list-keys -F output, for fuzzing only.

Not a supported API: it lets a fuzzer reach the decoder without making it public, behind a feature no release turns on.

Session 3 types
Session 48 members

One tmux session, together with the snapshot it was discovered with.

WindowPlacement 2 members

Where a new window goes, relative to the index it is given.

SessionName 2 members

A session name tmux can address.

Window 4 types
Window 57 members

One tmux window, as reached through one session that links it.

Respawn 2 members

What to do about a process still running where one is being respawned.

PaneSize 2 members

How much space a new pane gets.

WindowConfig 12 members

One window and the panes it should contain.

Pane 4 types
Pane 73 members

One tmux pane, as reached through one window link.

PaneWait 3 members

What came of waiting for a pane to do something.

PaneDirection 4 members

Which way to move focus among a window's panes.

Client 1 type
Client 21 members

One client attached to the tmux server.

Hooks 1 type, 1 function or constant
SparseValues 8 members

The values one array option holds, by the index tmux stores them under.

IndexedHooks : SparseValues<TmuxText>
typealias [source]
typealias [source]
IndexedHooks

The commands one hook name holds.

A hook is an array option whose values are tmux commands, so this is the SparseValues of 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
OptionScope 4 members

Which table an option primarily lives in.

OptionSchema 6 members

What tmux declares about one option.

OptionValueRefusal 3 members

Why a typed option write was refused before it reached tmux.

OptionValue 3 members

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>
function [source]
function [source]
option_schema

Look up what tmux declares about one option.

An option tmux does not declare, such as a user option beginning with @, returns None: 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
ACTIVITY_ACTION : &str
constant [source]
constant [source]
ACTIVITY_ACTION

tmux's activity-action option.

AFTER_BIND_KEY : &str
constant [source]
constant [source]
AFTER_BIND_KEY

tmux's after-bind-key option.

AFTER_CAPTURE_PANE : &str
constant [source]
constant [source]
AFTER_CAPTURE_PANE

tmux's after-capture-pane option.

AFTER_COPY_MODE : &str
constant [source]
constant [source]
AFTER_COPY_MODE

tmux's after-copy-mode option.

AFTER_DISPLAY_MESSAGE : &str
constant [source]
constant [source]
AFTER_DISPLAY_MESSAGE

tmux's after-display-message option.

AFTER_DISPLAY_PANES : &str
constant [source]
constant [source]
AFTER_DISPLAY_PANES

tmux's after-display-panes option.

AFTER_KILL_PANE : &str
constant [source]
constant [source]
AFTER_KILL_PANE

tmux's after-kill-pane option.

AFTER_LIST_BUFFERS : &str
constant [source]
constant [source]
AFTER_LIST_BUFFERS

tmux's after-list-buffers option.

AFTER_LIST_CLIENTS : &str
constant [source]
constant [source]
AFTER_LIST_CLIENTS

tmux's after-list-clients option.

AFTER_LIST_KEYS : &str
constant [source]
constant [source]
AFTER_LIST_KEYS

tmux's after-list-keys option.

AFTER_LIST_PANES : &str
constant [source]
constant [source]
AFTER_LIST_PANES

tmux's after-list-panes option.

AFTER_LIST_SESSIONS : &str
constant [source]
constant [source]
AFTER_LIST_SESSIONS

tmux's after-list-sessions option.

AFTER_LIST_WINDOWS : &str
constant [source]
constant [source]
AFTER_LIST_WINDOWS

tmux's after-list-windows option.

AFTER_LOAD_BUFFER : &str
constant [source]
constant [source]
AFTER_LOAD_BUFFER

tmux's after-load-buffer option.

AFTER_LOCK_SERVER : &str
constant [source]
constant [source]
AFTER_LOCK_SERVER

tmux's after-lock-server option.

AFTER_NEW_SESSION : &str
constant [source]
constant [source]
AFTER_NEW_SESSION

tmux's after-new-session option.

AFTER_NEW_WINDOW : &str
constant [source]
constant [source]
AFTER_NEW_WINDOW

tmux's after-new-window option.

AFTER_PASTE_BUFFER : &str
constant [source]
constant [source]
AFTER_PASTE_BUFFER

tmux's after-paste-buffer option.

AFTER_PIPE_PANE : &str
constant [source]
constant [source]
AFTER_PIPE_PANE

tmux's after-pipe-pane option.

AFTER_QUEUE : &str
constant [source]
constant [source]
AFTER_QUEUE

tmux's after-queue option.

AFTER_REFRESH_CLIENT : &str
constant [source]
constant [source]
AFTER_REFRESH_CLIENT

tmux's after-refresh-client option.

AFTER_RENAME_SESSION : &str
constant [source]
constant [source]
AFTER_RENAME_SESSION

tmux's after-rename-session option.

AFTER_RENAME_WINDOW : &str
constant [source]
constant [source]
AFTER_RENAME_WINDOW

tmux's after-rename-window option.

AFTER_RESIZE_PANE : &str
constant [source]
constant [source]
AFTER_RESIZE_PANE

tmux's after-resize-pane option.

AFTER_RESIZE_WINDOW : &str
constant [source]
constant [source]
AFTER_RESIZE_WINDOW

tmux's after-resize-window option.

AFTER_SAVE_BUFFER : &str
constant [source]
constant [source]
AFTER_SAVE_BUFFER

tmux's after-save-buffer option.

AFTER_SELECT_LAYOUT : &str
constant [source]
constant [source]
AFTER_SELECT_LAYOUT

tmux's after-select-layout option.

AFTER_SELECT_PANE : &str
constant [source]
constant [source]
AFTER_SELECT_PANE

tmux's after-select-pane option.

AFTER_SELECT_WINDOW : &str
constant [source]
constant [source]
AFTER_SELECT_WINDOW

tmux's after-select-window option.

AFTER_SEND_KEYS : &str
constant [source]
constant [source]
AFTER_SEND_KEYS

tmux's after-send-keys option.

AFTER_SET_BUFFER : &str
constant [source]
constant [source]
AFTER_SET_BUFFER

tmux's after-set-buffer option.

AFTER_SET_ENVIRONMENT : &str
constant [source]
constant [source]
AFTER_SET_ENVIRONMENT

tmux's after-set-environment option.

AFTER_SET_HOOK : &str
constant [source]
constant [source]
AFTER_SET_HOOK

tmux's after-set-hook option.

AFTER_SET_OPTION : &str
constant [source]
constant [source]
AFTER_SET_OPTION

tmux's after-set-option option.

AFTER_SHOW_ENVIRONMENT : &str
constant [source]
constant [source]
AFTER_SHOW_ENVIRONMENT

tmux's after-show-environment option.

AFTER_SHOW_MESSAGES : &str
constant [source]
constant [source]
AFTER_SHOW_MESSAGES

tmux's after-show-messages option.

AFTER_SHOW_OPTIONS : &str
constant [source]
constant [source]
AFTER_SHOW_OPTIONS

tmux's after-show-options option.

AFTER_SPLIT_WINDOW : &str
constant [source]
constant [source]
AFTER_SPLIT_WINDOW

tmux's after-split-window option.

AFTER_UNBIND_KEY : &str
constant [source]
constant [source]
AFTER_UNBIND_KEY

tmux's after-unbind-key option.

AGGRESSIVE_RESIZE : &str
constant [source]
constant [source]
AGGRESSIVE_RESIZE

tmux's aggressive-resize option.

ALERT_ACTIVITY : &str
constant [source]
constant [source]
ALERT_ACTIVITY

tmux's alert-activity option.

ALERT_BELL : &str
constant [source]
constant [source]
ALERT_BELL

tmux's alert-bell option.

ALERT_SILENCE : &str
constant [source]
constant [source]
ALERT_SILENCE

tmux's alert-silence option.

ALLOW_PASSTHROUGH : &str
constant [source]
constant [source]
ALLOW_PASSTHROUGH

tmux's allow-passthrough option.

ALLOW_RENAME : &str
constant [source]
constant [source]
ALLOW_RENAME

tmux's allow-rename option.

ALLOW_SET_TITLE : &str
constant [source]
constant [source]
ALLOW_SET_TITLE

tmux's allow-set-title option.

ALTERNATE_SCREEN : &str
constant [source]
constant [source]
ALTERNATE_SCREEN

tmux's alternate-screen option.

ASSUME_PASTE_TIME : &str
constant [source]
constant [source]
ASSUME_PASTE_TIME

tmux's assume-paste-time option.

AUTOMATIC_RENAME : &str
constant [source]
constant [source]
AUTOMATIC_RENAME

tmux's automatic-rename option.

AUTOMATIC_RENAME_FORMAT : &str
constant [source]
constant [source]
AUTOMATIC_RENAME_FORMAT

tmux's automatic-rename-format option.

BACKSPACE : &str
constant [source]
constant [source]
BACKSPACE

tmux's backspace option.

BASE_INDEX : &str
constant [source]
constant [source]
BASE_INDEX

tmux's base-index option.

BELL_ACTION : &str
constant [source]
constant [source]
BELL_ACTION

tmux's bell-action option.

BUFFER_LIMIT : &str
constant [source]
constant [source]
BUFFER_LIMIT

tmux's buffer-limit option.

CLIENT_ACTIVE : &str
constant [source]
constant [source]
CLIENT_ACTIVE

tmux's client-active option.

CLIENT_ATTACHED : &str
constant [source]
constant [source]
CLIENT_ATTACHED

tmux's client-attached option.

CLIENT_DARK_THEME : &str
constant [source]
constant [source]
CLIENT_DARK_THEME

tmux's client-dark-theme option.

CLIENT_DETACHED : &str
constant [source]
constant [source]
CLIENT_DETACHED

tmux's client-detached option.

CLIENT_FOCUS_IN : &str
constant [source]
constant [source]
CLIENT_FOCUS_IN

tmux's client-focus-in option.

CLIENT_FOCUS_OUT : &str
constant [source]
constant [source]
CLIENT_FOCUS_OUT

tmux's client-focus-out option.

CLIENT_LIGHT_THEME : &str
constant [source]
constant [source]
CLIENT_LIGHT_THEME

tmux's client-light-theme option.

CLIENT_RESIZED : &str
constant [source]
constant [source]
CLIENT_RESIZED

tmux's client-resized option.

CLIENT_SESSION_CHANGED : &str
constant [source]
constant [source]
CLIENT_SESSION_CHANGED

tmux's client-session-changed option.

CLOCK_MODE_COLOUR : &str
constant [source]
constant [source]
CLOCK_MODE_COLOUR

tmux's clock-mode-colour option.

CLOCK_MODE_STYLE : &str
constant [source]
constant [source]
CLOCK_MODE_STYLE

tmux's clock-mode-style option.

CODEPOINT_WIDTHS : &str
constant [source]
constant [source]
CODEPOINT_WIDTHS

tmux's codepoint-widths option.

COMMAND_ALIAS : &str
constant [source]
constant [source]
COMMAND_ALIAS

tmux's command-alias option.

COMMAND_ERROR : &str
constant [source]
constant [source]
COMMAND_ERROR

tmux's command-error option.

COPY_COMMAND : &str
constant [source]
constant [source]
COPY_COMMAND

tmux's copy-command option.

COPY_MODE_CURRENT_LINE_NUMBER_STYLE : &str
constant [source]
constant [source]
COPY_MODE_CURRENT_LINE_NUMBER_STYLE

tmux's copy-mode-current-line-number-style option.

COPY_MODE_CURRENT_MATCH_STYLE : &str
constant [source]
constant [source]
COPY_MODE_CURRENT_MATCH_STYLE

tmux's copy-mode-current-match-style option.

COPY_MODE_LINE_NUMBER_STYLE : &str
constant [source]
constant [source]
COPY_MODE_LINE_NUMBER_STYLE

tmux's copy-mode-line-number-style option.

COPY_MODE_LINE_NUMBERS : &str
constant [source]
constant [source]
COPY_MODE_LINE_NUMBERS

tmux's copy-mode-line-numbers option.

COPY_MODE_MARK_STYLE : &str
constant [source]
constant [source]
COPY_MODE_MARK_STYLE

tmux's copy-mode-mark-style option.

COPY_MODE_MATCH_STYLE : &str
constant [source]
constant [source]
COPY_MODE_MATCH_STYLE

tmux's copy-mode-match-style option.

COPY_MODE_POSITION_FORMAT : &str
constant [source]
constant [source]
COPY_MODE_POSITION_FORMAT

tmux's copy-mode-position-format option.

COPY_MODE_POSITION_STYLE : &str
constant [source]
constant [source]
COPY_MODE_POSITION_STYLE

tmux's copy-mode-position-style option.

COPY_MODE_SELECTION_STYLE : &str
constant [source]
constant [source]
COPY_MODE_SELECTION_STYLE

tmux's copy-mode-selection-style option.

CURSOR_COLOUR : &str
constant [source]
constant [source]
CURSOR_COLOUR

tmux's cursor-colour option.

CURSOR_STYLE : &str
constant [source]
constant [source]
CURSOR_STYLE

tmux's cursor-style option.

DEFAULT_CLIENT_COMMAND : &str
constant [source]
constant [source]
DEFAULT_CLIENT_COMMAND

tmux's default-client-command option.

DEFAULT_COMMAND : &str
constant [source]
constant [source]
DEFAULT_COMMAND

tmux's default-command option.

DEFAULT_SHELL : &str
constant [source]
constant [source]
DEFAULT_SHELL

tmux's default-shell option.

DEFAULT_SIZE : &str
constant [source]
constant [source]
DEFAULT_SIZE

tmux's default-size option.

DEFAULT_TERMINAL : &str
constant [source]
constant [source]
DEFAULT_TERMINAL

tmux's default-terminal option.

DESTROY_UNATTACHED : &str
constant [source]
constant [source]
DESTROY_UNATTACHED

tmux's destroy-unattached option.

DETACH_ON_DESTROY : &str
constant [source]
constant [source]
DETACH_ON_DESTROY

tmux's detach-on-destroy option.

DISPLAY_PANES_ACTIVE_COLOUR : &str
constant [source]
constant [source]
DISPLAY_PANES_ACTIVE_COLOUR

tmux's display-panes-active-colour option.

DISPLAY_PANES_COLOUR : &str
constant [source]
constant [source]
DISPLAY_PANES_COLOUR

tmux's display-panes-colour option.

DISPLAY_PANES_TIME : &str
constant [source]
constant [source]
DISPLAY_PANES_TIME

tmux's display-panes-time option.

DISPLAY_TIME : &str
constant [source]
constant [source]
DISPLAY_TIME

tmux's display-time option.

EDITOR : &str
constant [source]
constant [source]
EDITOR

tmux's editor option.

ESCAPE_TIME : &str
constant [source]
constant [source]
ESCAPE_TIME

tmux's escape-time option.

EXIT_EMPTY : &str
constant [source]
constant [source]
EXIT_EMPTY

tmux's exit-empty option.

EXIT_UNATTACHED : &str
constant [source]
constant [source]
EXIT_UNATTACHED

tmux's exit-unattached option.

EXTENDED_KEYS : &str
constant [source]
constant [source]
EXTENDED_KEYS

tmux's extended-keys option.

EXTENDED_KEYS_FORMAT : &str
constant [source]
constant [source]
EXTENDED_KEYS_FORMAT

tmux's extended-keys-format option.

FILL_CHARACTER : &str
constant [source]
constant [source]
FILL_CHARACTER

tmux's fill-character option.

FOCUS_EVENTS : &str
constant [source]
constant [source]
FOCUS_EVENTS

tmux's focus-events option.

FOCUS_FOLLOWS_MOUSE : &str
constant [source]
constant [source]
FOCUS_FOLLOWS_MOUSE

tmux's focus-follows-mouse option.

GET_CLIPBOARD : &str
constant [source]
constant [source]
GET_CLIPBOARD

tmux's get-clipboard option.

HISTORY_FILE : &str
constant [source]
constant [source]
HISTORY_FILE

tmux's history-file option.

HISTORY_LIMIT : &str
constant [source]
constant [source]
HISTORY_LIMIT

tmux's history-limit option.

INITIAL_REPEAT_TIME : &str
constant [source]
constant [source]
INITIAL_REPEAT_TIME

tmux's initial-repeat-time option.

INPUT_BUFFER_SIZE : &str
constant [source]
constant [source]
INPUT_BUFFER_SIZE

tmux's input-buffer-size option.

KEY_TABLE : &str
constant [source]
constant [source]
KEY_TABLE

tmux's key-table option.

LOCK_AFTER_TIME : &str
constant [source]
constant [source]
LOCK_AFTER_TIME

tmux's lock-after-time option.

LOCK_COMMAND : &str
constant [source]
constant [source]
LOCK_COMMAND

tmux's lock-command option.

MAIN_PANE_HEIGHT : &str
constant [source]
constant [source]
MAIN_PANE_HEIGHT

tmux's main-pane-height option.

MAIN_PANE_WIDTH : &str
constant [source]
constant [source]
MAIN_PANE_WIDTH

tmux's main-pane-width option.

MENU_BORDER_LINES : &str
constant [source]
constant [source]
MENU_BORDER_LINES

tmux's menu-border-lines option.

MENU_BORDER_STYLE : &str
constant [source]
constant [source]
MENU_BORDER_STYLE

tmux's menu-border-style option.

MENU_SELECTED_STYLE : &str
constant [source]
constant [source]
MENU_SELECTED_STYLE

tmux's menu-selected-style option.

MENU_STYLE : &str
constant [source]
constant [source]
MENU_STYLE

tmux's menu-style option.

MESSAGE_COMMAND_STYLE : &str
constant [source]
constant [source]
MESSAGE_COMMAND_STYLE

tmux's message-command-style option.

MESSAGE_FORMAT : &str
constant [source]
constant [source]
MESSAGE_FORMAT

tmux's message-format option.

MESSAGE_LIMIT : &str
constant [source]
constant [source]
MESSAGE_LIMIT

tmux's message-limit option.

MESSAGE_LINE : &str
constant [source]
constant [source]
MESSAGE_LINE

tmux's message-line option.

MESSAGE_STYLE : &str
constant [source]
constant [source]
MESSAGE_STYLE

tmux's message-style option.

MODE_KEYS : &str
constant [source]
constant [source]
MODE_KEYS

tmux's mode-keys option.

MODE_STYLE : &str
constant [source]
constant [source]
MODE_STYLE

tmux's mode-style option.

MONITOR_ACTIVITY : &str
constant [source]
constant [source]
MONITOR_ACTIVITY

tmux's monitor-activity option.

MONITOR_BELL : &str
constant [source]
constant [source]
MONITOR_BELL

tmux's monitor-bell option.

MONITOR_SILENCE : &str
constant [source]
constant [source]
MONITOR_SILENCE

tmux's monitor-silence option.

MOUSE : &str
constant [source]
constant [source]
MOUSE

tmux's mouse option.

OTHER_PANE_HEIGHT : &str
constant [source]
constant [source]
OTHER_PANE_HEIGHT

tmux's other-pane-height option.

OTHER_PANE_WIDTH : &str
constant [source]
constant [source]
OTHER_PANE_WIDTH

tmux's other-pane-width option.

PANE_ACTIVE_BORDER_STYLE : &str
constant [source]
constant [source]
PANE_ACTIVE_BORDER_STYLE

tmux's pane-active-border-style option.

PANE_BASE_INDEX : &str
constant [source]
constant [source]
PANE_BASE_INDEX

tmux's pane-base-index option.

PANE_BORDER_FORMAT : &str
constant [source]
constant [source]
PANE_BORDER_FORMAT

tmux's pane-border-format option.

PANE_BORDER_INDICATORS : &str
constant [source]
constant [source]
PANE_BORDER_INDICATORS

tmux's pane-border-indicators option.

PANE_BORDER_LINES : &str
constant [source]
constant [source]
PANE_BORDER_LINES

tmux's pane-border-lines option.

PANE_BORDER_STATUS : &str
constant [source]
constant [source]
PANE_BORDER_STATUS

tmux's pane-border-status option.

PANE_BORDER_STYLE : &str
constant [source]
constant [source]
PANE_BORDER_STYLE

tmux's pane-border-style option.

PANE_COLOURS : &str
constant [source]
constant [source]
PANE_COLOURS

tmux's pane-colours option.

PANE_DIED : &str
constant [source]
constant [source]
PANE_DIED

tmux's pane-died option.

PANE_EXITED : &str
constant [source]
constant [source]
PANE_EXITED

tmux's pane-exited option.

PANE_FOCUS_IN : &str
constant [source]
constant [source]
PANE_FOCUS_IN

tmux's pane-focus-in option.

PANE_FOCUS_OUT : &str
constant [source]
constant [source]
PANE_FOCUS_OUT

tmux's pane-focus-out option.

PANE_MODE_CHANGED : &str
constant [source]
constant [source]
PANE_MODE_CHANGED

tmux's pane-mode-changed option.

PANE_SCROLLBARS : &str
constant [source]
constant [source]
PANE_SCROLLBARS

tmux's pane-scrollbars option.

PANE_SCROLLBARS_POSITION : &str
constant [source]
constant [source]
PANE_SCROLLBARS_POSITION

tmux's pane-scrollbars-position option.

PANE_SCROLLBARS_STYLE : &str
constant [source]
constant [source]
PANE_SCROLLBARS_STYLE

tmux's pane-scrollbars-style option.

PANE_SET_CLIPBOARD : &str
constant [source]
constant [source]
PANE_SET_CLIPBOARD

tmux's pane-set-clipboard option.

PANE_STATUS_CURRENT_STYLE : &str
constant [source]
constant [source]
PANE_STATUS_CURRENT_STYLE

tmux's pane-status-current-style option.

PANE_STATUS_STYLE : &str
constant [source]
constant [source]
PANE_STATUS_STYLE

tmux's pane-status-style option.

PANE_TITLE_CHANGED : &str
constant [source]
constant [source]
PANE_TITLE_CHANGED

tmux's pane-title-changed option.

POPUP_BORDER_LINES : &str
constant [source]
constant [source]
POPUP_BORDER_LINES

tmux's popup-border-lines option.

POPUP_BORDER_STYLE : &str
constant [source]
constant [source]
POPUP_BORDER_STYLE

tmux's popup-border-style option.

POPUP_STYLE : &str
constant [source]
constant [source]
POPUP_STYLE

tmux's popup-style option.

PREFIX : &str
constant [source]
constant [source]
PREFIX

tmux's prefix option.

PREFIX_TIMEOUT : &str
constant [source]
constant [source]
PREFIX_TIMEOUT

tmux's prefix-timeout option.

PREFIX2 : &str
constant [source]
constant [source]
PREFIX2

tmux's prefix2 option.

PROMPT_COMMAND_CURSOR_STYLE : &str
constant [source]
constant [source]
PROMPT_COMMAND_CURSOR_STYLE

tmux's prompt-command-cursor-style option.

PROMPT_CURSOR_COLOUR : &str
constant [source]
constant [source]
PROMPT_CURSOR_COLOUR

tmux's prompt-cursor-colour option.

PROMPT_CURSOR_STYLE : &str
constant [source]
constant [source]
PROMPT_CURSOR_STYLE

tmux's prompt-cursor-style option.

PROMPT_HISTORY_LIMIT : &str
constant [source]
constant [source]
PROMPT_HISTORY_LIMIT

tmux's prompt-history-limit option.

REMAIN_ON_EXIT : &str
constant [source]
constant [source]
REMAIN_ON_EXIT

tmux's remain-on-exit option.

REMAIN_ON_EXIT_FORMAT : &str
constant [source]
constant [source]
REMAIN_ON_EXIT_FORMAT

tmux's remain-on-exit-format option.

RENUMBER_WINDOWS : &str
constant [source]
constant [source]
RENUMBER_WINDOWS

tmux's renumber-windows option.

REPEAT_TIME : &str
constant [source]
constant [source]
REPEAT_TIME

tmux's repeat-time option.

SCROLL_ON_CLEAR : &str
constant [source]
constant [source]
SCROLL_ON_CLEAR

tmux's scroll-on-clear option.

SESSION_CLOSED : &str
constant [source]
constant [source]
SESSION_CLOSED

tmux's session-closed option.

SESSION_CREATED : &str
constant [source]
constant [source]
SESSION_CREATED

tmux's session-created option.

SESSION_RENAMED : &str
constant [source]
constant [source]
SESSION_RENAMED

tmux's session-renamed option.

SESSION_STATUS_CURRENT_STYLE : &str
constant [source]
constant [source]
SESSION_STATUS_CURRENT_STYLE

tmux's session-status-current-style option.

SESSION_STATUS_STYLE : &str
constant [source]
constant [source]
SESSION_STATUS_STYLE

tmux's session-status-style option.

SESSION_WINDOW_CHANGED : &str
constant [source]
constant [source]
SESSION_WINDOW_CHANGED

tmux's session-window-changed option.

SET_CLIPBOARD : &str
constant [source]
constant [source]
SET_CLIPBOARD

tmux's set-clipboard option.

SET_TITLES : &str
constant [source]
constant [source]
SET_TITLES

tmux's set-titles option.

SET_TITLES_STRING : &str
constant [source]
constant [source]
SET_TITLES_STRING

tmux's set-titles-string option.

SILENCE_ACTION : &str
constant [source]
constant [source]
SILENCE_ACTION

tmux's silence-action option.

STATUS : &str
constant [source]
constant [source]
STATUS

tmux's status option.

STATUS_BG : &str
constant [source]
constant [source]
STATUS_BG

tmux's status-bg option.

STATUS_FG : &str
constant [source]
constant [source]
STATUS_FG

tmux's status-fg option.

STATUS_FORMAT : &str
constant [source]
constant [source]
STATUS_FORMAT

tmux's status-format option.

STATUS_INTERVAL : &str
constant [source]
constant [source]
STATUS_INTERVAL

tmux's status-interval option.

STATUS_JUSTIFY : &str
constant [source]
constant [source]
STATUS_JUSTIFY

tmux's status-justify option.

STATUS_KEYS : &str
constant [source]
constant [source]
STATUS_KEYS

tmux's status-keys option.

STATUS_LEFT : &str
constant [source]
constant [source]
STATUS_LEFT

tmux's status-left option.

STATUS_LEFT_LENGTH : &str
constant [source]
constant [source]
STATUS_LEFT_LENGTH

tmux's status-left-length option.

STATUS_LEFT_STYLE : &str
constant [source]
constant [source]
STATUS_LEFT_STYLE

tmux's status-left-style option.

STATUS_POSITION : &str
constant [source]
constant [source]
STATUS_POSITION

tmux's status-position option.

STATUS_RIGHT : &str
constant [source]
constant [source]
STATUS_RIGHT

tmux's status-right option.

STATUS_RIGHT_LENGTH : &str
constant [source]
constant [source]
STATUS_RIGHT_LENGTH

tmux's status-right-length option.

STATUS_RIGHT_STYLE : &str
constant [source]
constant [source]
STATUS_RIGHT_STYLE

tmux's status-right-style option.

STATUS_STYLE : &str
constant [source]
constant [source]
STATUS_STYLE

tmux's status-style option.

SYNCHRONIZE_PANES : &str
constant [source]
constant [source]
SYNCHRONIZE_PANES

tmux's synchronize-panes option.

TERMINAL_FEATURES : &str
constant [source]
constant [source]
TERMINAL_FEATURES

tmux's terminal-features option.

TERMINAL_OVERRIDES : &str
constant [source]
constant [source]
TERMINAL_OVERRIDES

tmux's terminal-overrides option.

TILED_LAYOUT_MAX_COLUMNS : &str
constant [source]
constant [source]
TILED_LAYOUT_MAX_COLUMNS

tmux's tiled-layout-max-columns option.

TREE_MODE_PREVIEW_FORMAT : &str
constant [source]
constant [source]
TREE_MODE_PREVIEW_FORMAT

tmux's tree-mode-preview-format option.

TREE_MODE_PREVIEW_STYLE : &str
constant [source]
constant [source]
TREE_MODE_PREVIEW_STYLE

tmux's tree-mode-preview-style option.

UPDATE_ENVIRONMENT : &str
constant [source]
constant [source]
UPDATE_ENVIRONMENT

tmux's update-environment option.

USER_KEYS : &str
constant [source]
constant [source]
USER_KEYS

tmux's user-keys option.

VARIATION_SELECTOR_ALWAYS_WIDE : &str
constant [source]
constant [source]
VARIATION_SELECTOR_ALWAYS_WIDE

tmux's variation-selector-always-wide option.

VISUAL_ACTIVITY : &str
constant [source]
constant [source]
VISUAL_ACTIVITY

tmux's visual-activity option.

VISUAL_BELL : &str
constant [source]
constant [source]
VISUAL_BELL

tmux's visual-bell option.

VISUAL_SILENCE : &str
constant [source]
constant [source]
VISUAL_SILENCE

tmux's visual-silence option.

WINDOW_ACTIVE_STYLE : &str
constant [source]
constant [source]
WINDOW_ACTIVE_STYLE

tmux's window-active-style option.

WINDOW_LINKED : &str
constant [source]
constant [source]
WINDOW_LINKED

tmux's window-linked option.

WINDOW_PANE_CURRENT_STATUS_FORMAT : &str
constant [source]
constant [source]
WINDOW_PANE_CURRENT_STATUS_FORMAT

tmux's window-pane-current-status-format option.

WINDOW_PANE_STATUS_FORMAT : &str
constant [source]
constant [source]
WINDOW_PANE_STATUS_FORMAT

tmux's window-pane-status-format option.

WINDOW_SIZE : &str
constant [source]
constant [source]
WINDOW_SIZE

tmux's window-size option.

WINDOW_STATUS_ACTIVITY_STYLE : &str
constant [source]
constant [source]
WINDOW_STATUS_ACTIVITY_STYLE

tmux's window-status-activity-style option.

WINDOW_STATUS_BELL_STYLE : &str
constant [source]
constant [source]
WINDOW_STATUS_BELL_STYLE

tmux's window-status-bell-style option.

WINDOW_STATUS_CURRENT_FORMAT : &str
constant [source]
constant [source]
WINDOW_STATUS_CURRENT_FORMAT

tmux's window-status-current-format option.

WINDOW_STATUS_CURRENT_STYLE : &str
constant [source]
constant [source]
WINDOW_STATUS_CURRENT_STYLE

tmux's window-status-current-style option.

WINDOW_STATUS_FORMAT : &str
constant [source]
constant [source]
WINDOW_STATUS_FORMAT

tmux's window-status-format option.

WINDOW_STATUS_LAST_STYLE : &str
constant [source]
constant [source]
WINDOW_STATUS_LAST_STYLE

tmux's window-status-last-style option.

WINDOW_STATUS_SEPARATOR : &str
constant [source]
constant [source]
WINDOW_STATUS_SEPARATOR

tmux's window-status-separator option.

WINDOW_STATUS_STYLE : &str
constant [source]
constant [source]
WINDOW_STATUS_STYLE

tmux's window-status-style option.

WINDOW_STYLE : &str
constant [source]
constant [source]
WINDOW_STYLE

tmux's window-style option.

WINDOW_UNLINKED : &str
constant [source]
constant [source]
WINDOW_UNLINKED

tmux's window-unlinked option.

WORD_SEPARATORS : &str
constant [source]
constant [source]
WORD_SEPARATORS

tmux's word-separators option.

tmux's wrap-search option.

XTERM_KEYS : &str
constant [source]
constant [source]
XTERM_KEYS

tmux's xterm-keys option.

Keys and bindings 1 type
KeyBinding 5 members

One key binding, as tmux holds it.

Layout and geometry 5 types
Rotation 2 members

Where a split puts the new pane, relative to the one being divided.

Layout 9 members

One of the pane arrangements tmux knows by name.

LayoutSpec 2 members

What to arrange a window's panes as.

SplitDirection 4 members

Where a split puts the pane it makes.

ResizeDirection 4 members

Which edge a resize moves.

Environment 1 type
EnvironmentEntry 2 members

What a session's environment holds for one name.

Terminal capabilities 1 type
EngineCapabilities 1 members

Immutable capability state detected for one configured tmux executable.

Versions 3 types, 11 functions and constants
ReleaseSuffix 8 members

The suffix of a numbered tmux release.

ReleaseVersion 4 members

A numbered tmux release.

TmuxVersion 8 members

A parsed raw tmux version.

CAPTURE_LINE_FLAGS : ReleaseVersion
constant [source]
constant [source]
CAPTURE_LINE_FLAGS

capture-pane -F, and so crate::Pane::capture_lines .

CAPTURE_TRIM_BLANK_CELLS : ReleaseVersion
constant [source]
constant [source]
CAPTURE_TRIM_BLANK_CELLS

capture-pane -T, and so crate::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 gains T by 3.5a; tmux's own CHANGES puts it in the 3.3a-to-3.4 section.

-N and -P need no such gate: both are present at 3.2a, which is crate::TmuxVersion::MIN_SUPPORTED .

CLIENTS_HIDE_STOPPED : ReleaseVersion
constant [source]
constant [source]
CLIENTS_HIDE_STOPPED

list-clients leaving out a client that is stopped rather than gone, and so crate::Error::ClientSuspended being reachable at all.

From this release sort_get_clients screens the listing on CLIENT_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
constant [source]
constant [source]
CONTROL_PANE_OFF

Taking a pane out of a control client's stream without crashing the server, and so crate::control::ControlSender::mute_pane using off.

Before this release `refresh-client -A <pane>:offleaves 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
constant [source]
constant [source]
JSON_LAYOUTS

window_layout and select-layout using a JSON subset instead of the classic checksum-prefixed string, and so crate::LayoutSpec::Saved accepting one.

tmux's own CHANGES FROM 3.7c TO 3.8 names 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
constant [source]
constant [source]
LIST_KEYS_FORMAT

list-keys -F, and so crate::Server::typed_key_bindings .

Below this release list-keys prints only its own bind-key lines, which quote a key and leave a table name bare, and carry no note.

MIRRORED_LAYOUTS : ReleaseVersion
constant [source]
constant [source]
MIRRORED_LAYOUTS

The mirrored layouts, and so crate::Layout::MainHorizontalMirrored and crate::Layout::MainVerticalMirrored .

Below this release layout_set_lookup does not carry those names, and tmux refuses one as it would a typo.

PANE_BORDER_FORMAT_PER_PANE : ReleaseVersion
constant [source]
constant [source]
PANE_BORDER_FORMAT_PER_PANE

pane-border-format becoming a pane option as well as a window one.

Below this release tmux stores it only per window, and a write sent with -p lands there instead -- reporting success for a change the caller did not ask for. See crate::OptionSchema::accepts .

PANE_BORDER_STYLE_PER_PANE : ReleaseVersion
constant [source]
constant [source]
PANE_BORDER_STYLE_PER_PANE

pane-border-style and pane-active-border-style becoming pane options as well as window ones, with the same consequence below it as PANE_BORDER_FORMAT_PER_PANE .

PROMPT_HISTORY : ReleaseVersion
constant [source]
constant [source]
PROMPT_HISTORY

The prompt history, and so crate::Server::prompt_history .

SERVER_ACCESS : ReleaseVersion
constant [source]
constant [source]
SERVER_ACCESS

server-access, and so crate::Server::access_rules .

Commands 6 types
Command 4 members

A logical tmux command with classified diagnostic arguments.

CommandChain 4 members

Several tmux commands dispatched as one tmux a \; b invocation.

CommandSummary 3 members

A rendering of a dispatched command that is safe to log.

DispatchLimits 4 members

How much work one server may have in flight at once.

TmuxArg 3 members

Text bound for a tmux argument that tmux expands as a format.

ShellCommand 5 members

One command typed into a pane, with tmuxp's per-command settings.

Control mode 6 types, 2 functions and constants
Subscription 5 members

What a subscription watches.

ControlSender 10 members

Sends commands down a control-mode connection.

ControlEvents 2 members

Receives tmux notifications and terminal connection errors.

PaneOutput 5 members

What one pane writes, as it writes it.

ControlClientLimits 4 members

How many persistent control-mode clients one server may hold.

ControlLimits 6 members

What one control-mode connection may accumulate before it gives up.

__fuzz_control_blocks ( data : &[u8] )
function [source]
function [source]
__fuzz_control_blocks

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.

__fuzz_parse_control_line ( line : &[u8] )
function [source]
function [source]
__fuzz_parse_control_line

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::parse without it becoming public -- and it is gated behind a feature no release turns on.

Formats 1 type, 2 functions and constants
TmuxText 6 members

Immutable text bytes returned by tmux.

__fuzz_format_rows ( data : &[u8] )
function [source]
function [source]
__fuzz_format_rows

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_format ( text : impl AsRef<OsStr> ) → OsString
function [source]
function [source]
escape_format

Escape text so tmux uses it as written rather than expanding it.

tmux runs its format machinery over more than names: #(command) runs command in a shell and #{session_id} becomes the id, in a session or window name and in the start directory -c names 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 raw crate::Command of 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
Matcher 0 members

A predicate that evaluates a borrowed candidate.

QueryIteratorExt 0 members

Cardinality and named-predicate operations for native iterators.

FilterEnum 0 members

Stable string semantics for a custom enum filter field.

Filterable 0 members

A type with a stable schema that can evaluate portable filter predicates.

ManyRelation 3 members

A value-only handle for a to-many relation from From to To.

OneRelation 1 members

A value-only handle for a to-one relation from From to To.

FilterSchema 0 members

A filter target whose portable expression grammar can be described.

FilterSchemaDescriptor 3 members

One target and every field its decoder accepts.

FilterValueSchema 7 members

The value or relation family behind one filter field.

bool_field ( target : &'static str , field : &'static str ) → BoolField<T>
function [source]
function [source]
bool_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"));
enum_field ( target : &'static str , field : &'static str ) → EnumField<T, E>
function [source]
function [source]
enum_field

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
function [source]
function [source]
filter_schema

Return generated metadata for one related target.

integer_field ( target : &'static str , field : &'static str ) → IntegerField<T, N>
function [source]
function [source]
integer_field

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>
function [source]
function [source]
many_relation

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>
function [source]
function [source]
one_relation

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"));
text_field ( target : &'static str , field : &'static str ) → TextField<T>
function [source]
function [source]
text_field

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
function [source]
function [source]
unknown_field_error

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
TextField 12 members

A typed handle for a portable text field on T.

BoolField 3 members

A typed handle for a portable boolean field on T.

IntegerField 0 members

A typed handle for a fixed-width integer field N on T.

EnumField 3 members

A typed handle for a custom enum field E on T.

FilterFieldSchema 1 members

One accepted field and the predicates valid for it.

ReadField 0 members

A field handle whose value a Target snapshot holds.

Queries — Expressions 2 types
FilterExpr 4 members

An opaque, portable predicate over candidates of type T.

Predicate 14 members

One opaque predicate passed to generated candidate dispatch.

Snapshots 5 types
CapturedLine 4 members

One line of a capture, with what tmux knows about it.

CapturePane 2 members

Read a pane's contents.

Availability 7 members

A snapshot field's value, or the reason the snapshot holds none.

PaneProgressState 5 members

Closed progress-state vocabulary tmux emits for a pane's progress bar.

Sealed 0 members

Keeps super::ReadField implemented by this crate's handles only.

Workspaces 7 types
Effects 5 members

What an operation does to tmux state.

Safety 3 members

How an operation directly affects tmux objects.

SetOption 3 members

Set a tmux option.

SetEnvironment 1 members

Set a variable in a session's environment.

SendKeys 4 members

Send text or named keys to a pane.

Pause 2 members

Wait before the next operation runs.

SelectLayout 1 members

Rearrange a window's panes into a named or described layout.

Workspaces — Plans 5 types
Plan 10 members

Operations recorded but not yet run.

Planner 6 members

How a plan is grouped into tmux invocations.

WorkspaceReadme 0 members

Compiles the workspace README's examples, and nothing else.

Workspace 12 members

One workspace: a session and the windows it should contain.

WorkspaceBuilder 3 members

Creates tmux sessions from workspace configurations.

Workspaces — Steps 10 types
Operation 0 members

An operation that can be recorded in a Plan .

Chainable 0 members

An operation that may share one tmux invocation with its neighbours.

FromStep 0 members

Turns a recorded step index into whatever Plan::add returns for it.

Step 5 members

One tmux invocation: the operations it carries, in order.

StepReason 5 members

Why a Step is its own tmux invocation.

Outcome 5 members

How an operation ended.

Attribution 2 members

How much a run could tell about each operation's outcome.

OperationValue 5 members

The typed value one operation produced.

OperationReport 5 members

What one recorded operation produced, in plan order.

StepOutcome 7 members

What one dispatched invocation produced.

Workspaces — Targets and slots 8 types
Scope 3 members

The tmux object an operation addresses or makes.

Slot 3 members

A typed reference to the object a recorded operation will create.

SessionSlot 0 members

Marker for a slot that points at a session.

WindowSlot 0 members

Marker for a slot that points at a window.

PaneSlot 0 members

Marker for a slot that points at a pane.

PaneTarget 2 members

A -t target naming a pane, resolved when the plan runs.

WindowTarget 2 members

A -t target naming a window, resolved when the plan runs.

SessionTarget 2 members

A -t target naming a session, resolved when the plan runs.

Workspaces — Session 1 type
NewSession 3 members

Create a session.

Workspaces — Window 5 types
SplitWindow 7 members

Split a window, making a pane.

NewWindow 7 members

Create a window in a session.

SelectWindow 1 members

Make a window the active one.

RenameWindow 1 members

Rename a window.

KillWindow 2 members

Destroy a window.

Workspaces — Pane 2 types
SelectPane 1 members

Make a pane the active one.

KillPane 2 members

Destroy a pane.

Errors 14 types
ControlModeErrorKind 9 members

Why a control-mode connection failed.

OptionErrorKind 3 members

Which way tmux would not accept an option.

ErrorKind 10 members

A coarse failure category for reporting and routing.

IdParseError 1 members

An invalid scope-specific tmux object ID.

Error 47 members

An error returned by libtmux.

ObjectKind 4 members

The kind of tmux object a failure refers to.

ListingDecodeError 2 members

Payload-free metadata describing why tmux output could not be decoded.

ScopeError 7 members

A scoped resource's creation, operation, or cleanup failure.

PlanValidationError 5 members

An invalid dependency between two plan steps, or a step whose own arguments cannot render as one tmux command.

ExactlyOneError 2 members

The ways an iterator can fail to contain exactly one item.

MultipleItemsError 0 members

An error indicating that an iterator contained more than one item.

FilterExpressionError 1 members

A source-less, value-free portable expression validation error.

ConfigError 4 members

A workspace configuration failure.

BuildError 5 members

A failure while building a workspace.

Errors — Server 2 types
ServerGoneKind 4 members

Which way a tmux server was not there.

Errors — Session 1 type
SessionNameError 2 members

Why a session name is one tmux could not address.

Constants and enums 15 types
CommandResult 13 members

The exact status and output captured for one tmux command.

Event 30 members

Something tmux reported that no command asked for.

BlockResult 4 members

The outcome of one command sent over control mode.

ControlMode 7 members

One control-mode connection to a tmux server.

ReplaceMode 2 members

Whether writing a hook keeps the entries it does not name.

OptionKind 7 members

What kind of value an option holds.

CaptureOptions 9 members

How far back a capture reaches, and in what form.

PlanValidationErrorKind 6 members

Why a plan dependency is invalid.

PlanResult 5 members

What running a plan produced.

FilterExpressionErrorKind 9 members

The category of an invalid portable filter expression.

IntegerKind 10 members

The fixed-width integer types understood by generated schema checks.

AccessMode 2 members

How much a user on the server's access list may do.

PromptKind 4 members

Which prompt tmux is remembering answers for.

JoinOptions 3 members

Where a pane lands when it is moved into another window.

SplitOptions 8 members

Options for splitting a window or pane into a new pane.

Constants and enums — Session 1 type
NewSessionOptions 6 members

Options for creating a session.

Constants and enums — Window 1 type
NewWindowOptions 9 members

Options for creating a window in a session.

Testing utilities 6 types, 4 functions and constants
TestServerErrorKind 10 members

The category of a TestServer lifecycle failure.

TestServerError 2 members

A source-less, redacted failure from TestServer .

TestServerBuilder 6 members

A consuming builder for an isolated foreground tmux test server.

TestServer 8 members

One isolated tmux daemon and its descriptor-relative cleanup guard.

DaemonState 4 members

Whether a fixture's tmux daemon is still running, and how it ended if not.

RetryTimeout 1 members

A condition did not hold before its deadline.

reap_abandoned_servers ( older_than : Duration ) → Result<Vec<PathBuf>, TestServerError>
function [source]
function [source]
reap_abandoned_servers

Kill tmux servers left behind by fixtures that never cleaned up.

A TestServer removes 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 next fork fails with No 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_than is a second guard on top, for a fixture whose owner id has been reused; pass Duration::ZERO to 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>
function [source]
function [source]
retry_until

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 RetryTimeout when the condition did not hold before the deadline. The condition's own errors are its business; return false to 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

scaled ( base : Duration ) → Duration
function [source]
function [source]
scaled

Widen a fixture deadline by LIBTMUX_TEST_TIMEOUT_SCALE.

retry_until and 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 1 all leave base as 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));
unique_name ( prefix : &str ) → String
function [source]
function [source]
unique_name

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
Runtime 3 members

A runtime for calling this crate's async methods from ordinary code.

OutputLimits 6 members

How many bytes one dispatch may read from each stream.

DesignNotes 0 members

The design notes, compiled.

MacrosReadme 0 members

Compiles the libtmux-macros README's examples, and nothing else.

By module 54 modules

Esc

Type to search.