libtmux Reference MCP Search
On this page

Rust API reference

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

By module 56 modules

  • blocking 1
  • capabilities 1
  • client 1
  • command 9
  • config 5
  • control 8
  • error 13
  • formats 8
  • freeze 1
  • hooks 3
  • limits 4
  • options 5
  • pane 5
  • plan 20
  • query 11
  • server 10
  • session 4
  • snapshot 13
  • src 5
  • target 13
  • test 11
  • version 12
  • window 11
  • control.actor 12
  • control.lifecycle_tests 1
  • control.protocol 5
  • error.classification 1
  • error.refusal 1
  • formats.plan 8
  • formats.row 9
  • formats.text 3
  • options.generated 217
  • pane.observe 1
  • pane.settings 1
  • plan.planner 3
  • plan.run 9
  • plan.wire 14
  • query.fields 6
  • query.grammar 7
  • query.matching 23
  • query.private 9
  • query.schema 6
  • query.serde_v1 18
  • server.builder 1
  • server.channels 1
  • server.discovery 5
  • server.interactive 1
  • server.settings 1
  • session.settings 1
  • window.navigation 1
  • window.settings 1
  • plan.ops.options 2
  • plan.ops.panes 5
  • plan.ops.sessions 1
  • plan.ops.windows 5
  • Types 57
Server 18 types
Session 5 types
Window 12 types
Pane 5 types
Client 1 type
Hooks 1 type
Options 3 types
Terminal capabilities 1 type
Versions 3 types
Commands 8 types
Control mode 11 types
Formats 21 types
Queries 14 types
Queries — Fields 6 types
Queries — Operators 3 types
Queries — Expressions 20 types
Queries — Serialisation 12 types
Snapshots 9 types
Workspaces 8 types
Workspaces — Plans 6 types
Workspaces — Steps 12 types
Workspaces — Targets and slots 11 types
Workspaces — Session 1 type
Workspaces — Window 5 types
Workspaces — Pane 2 types
Requests 3 types
Errors 19 types
Errors — Server 2 types
Errors — Session 1 type
Constants and enums 17 types
Constants and enums — Session 1 type
Constants and enums — Window 1 type
Testing utilities 7 types
Other 9 types
Functions and constants 0 types
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.

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.

CLEANUP_POLL_INTERVAL : Duration
constant [source]
constant [source]
CLEANUP_POLL_INTERVAL

How long a blocking wait sleeps before looking again.

Sleeping rather than yielding, for the reason [design.md] gives about the async poll loops and which applies with more force here: this runs inside spawn_blocking while waiting for a *process* to exit, so a spin holds a core the daemon needs to handle the signal it was just sent. On a machine with fewer cores than the suite has concurrent fixtures, that is the difference between a clean shutdown and a grace window that expires.

[design.md]: ../docs/design.md

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.

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.

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.

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.

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.

EVENT_QUEUE : usize
constant [source]
constant [source]
EVENT_QUEUE

How many events may buffer before the connection stops reading tmux.

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.

HELD_WHILE_AWAITING : usize
constant [source]
constant [source]
HELD_WHILE_AWAITING

How many events may be held while a reply is outstanding.

Reading continues while something is waiting for a reply, because the reply arrives on the connection that would otherwise pause. That is bounded by how long a reply takes, and tmux answers most commands at once -- but not all. run-shell without -b answers its own block immediately and then parks the queue for as long as its shell command runs, so the next command sent is outstanding for that long and this end would hold events for the duration. A ceiling turns that into a pause rather than a memory leak.

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.

MAX_EXPRESSION_DEPTH : usize
constant [source]
constant [source]
MAX_EXPRESSION_DEPTH
MAX_EXPRESSION_NODES : usize
constant [source]
constant [source]
MAX_EXPRESSION_NODES
MAX_SET_VALUES : usize
constant [source]
constant [source]
MAX_SET_VALUES
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.

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.

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.

NO_CURRENT_CLIENT : &str
constant [source]
constant [source]
NO_CURRENT_CLIENT

What tmux says when it has no client to act on.

NO_CURRENT_TARGET : &str
constant [source]
constant [source]
NO_CURRENT_TARGET

What tmux says when it holds no session to resolve a target against.

NO_SUCH_NEIGHBOUR : [&str; 4]
constant [source]
constant [source]
NO_SUCH_NEIGHBOUR

What tmux says when a move has nowhere to go.

Reported as a command failure, but it is an ordinary state rather than a fault: a session holding one window has no next window and never will. Navigation reports it as absence so a caller does not have to tell the two apart by reading text.

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_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_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_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 ].

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 : ReleaseVersion
constant [source]
constant [source]
PROMPT_HISTORY

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

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

tmux's prompt-history-limit option.

QUOTE_SHELL_SPECIALS : &[u8]
constant [source]
constant [source]
QUOTE_SHELL_SPECIALS

Bytes that #{q:} prefixes with a backslash.

This is tmux's format_quote_shell set. None of these bytes is an octal digit or one of the letters vis emits, so the two escaping layers below compose into one unambiguous grammar.

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.

SENSITIVE_OUTPUT_WITHHELD : &str
constant [source]
constant [source]
SENSITIVE_OUTPUT_WITHHELD
SERVER_ACCESS : ReleaseVersion
constant [source]
constant [source]
SERVER_ACCESS

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

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.

VERSION : u8
constant [source]
constant [source]
VERSION
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.

__fuzz_parse_control_line ( line : &[u8] )
function [source]
function [source]
__fuzz_parse_control_line
admit_request ( request : Request , pending_events : usize ) Option<Request>
function [source]
function [source]
admit_request
argument ( value : &OsString , serializer : S ) Result<S::Ok, S::Error>
function [source]
function [source]
argument

Serialize one argument.

assignment ( name : &OsStr , value : &OsStr ) OsString
function [source]
function [source]
assignment

Render one NAME=VALUE pair for tmux's -e flag.

Built from bytes because tmux accepts environment values that are not valid UTF-8, and rejecting them here would be stricter than tmux is.

bool_field ( target : &static str , field : &static str ) BoolField<T>
function [source]
function [source]
bool_field
deadline_elapsed ( deadline : Option<Instant> )
function [source]
function [source]
deadline_elapsed
decode_ascii ( slot : ParsedSlot<_> ) Result<&str, FormatCodecError>
function [source]
function [source]
decode_ascii
decode_text ( slot : ParsedSlot<_> ) TmuxText
function [source]
function [source]
decode_text

Copy a text slot into an exact byte-preserving public value.

enum_field ( target : &static str , field : &static str ) EnumField<T, E>
function [source]
function [source]
enum_field
escape_format ( text : impl AsRef<OsStr> ) OsString
function [source]
function [source]
escape_format
evaluate ( expression : &ExprData , candidate : &T ) bool
function [source]
function [source]
evaluate
expression_is_resolved ( expression : &ExprData ) bool
function [source]
function [source]
expression_is_resolved
filter_schema ( ) FilterSchemaDescriptor
function [source]
function [source]
filter_schema
for_profile_selection_test ( profile : ListProfile , version : &TmuxVersion , supplements : &'static [&'static FormatDescriptor] ) FormatPlan
function [source]
function [source]
for_profile_selection_test
freeze ( session : &Session ) Result<Workspace, Error>
function [source]
function [source]
freeze

Describe a live session as a workspace.

The result is a [ Workspace ], so it can be rendered with Workspace::to_yaml or handed straight back to crate::WorkspaceBuilder to make another like it.

A pane is described by the command tmux says it is running. For a pane sitting at a shell that is the shell itself, which would restart as an empty pane -- correct, and rarely what was meant. Panes running something are the ones worth freezing.

Errors

Returns an error when the session's windows or panes cannot be listed.

Examples

use libtmux::{SplitDirection, SplitOptions};
use tmux_workspace::freeze;

let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("built-by-hand").await?;
let mut window = session.active_window().await?.expect("a window");
window.split(SplitOptions::new(SplitDirection::Below)).await?;

let workspace = freeze(&session).await?;

assert_eq!(workspace.session_name, "built-by-hand");
assert_eq!(workspace.windows.len(), 1);
assert_eq!(workspace.windows[0].panes.len(), 2);

// And it round-trips through the file format.
let yaml = workspace.to_yaml();
assert_eq!(tmux_workspace::Workspace::from_yaml(&yaml)?, workspace);

guard.shutdown().await?;
hydrate_client_infos_from_stdout ( plan : &FormatPlan , stdout : &[u8] ) Result<Vec<ClientInfo>, FormatCodecError>
function [source]
function [source]
hydrate_client_infos_from_stdout
hydrate_pane_projections_from_stdout ( server_identity : &ServerIdentity , plan : &FormatPlan , stdout : &[u8] ) Result<Vec<PaneProjection>, FormatCodecError>
function [source]
function [source]
hydrate_pane_projections_from_stdout
hydrate_session_infos_from_stdout ( plan : &FormatPlan , stdout : &[u8] ) Result<Vec<SessionInfo>, FormatCodecError>
function [source]
function [source]
hydrate_session_infos_from_stdout

Decode a complete list-sessions stdout into ordered snapshots.

Sessions and clients are intrinsic rather than projected, so they carry no winlink edge and need no server identity. Order is tmux's own.

hydrate_window_projections_from_stdout ( server_identity : &ServerIdentity , plan : &FormatPlan , stdout : &[u8] ) Result<Vec<WindowProjection>, FormatCodecError>
function [source]
function [source]
hydrate_window_projections_from_stdout
id ( value : &T , serializer : S ) Result<S::Ok, S::Error>
function [source]
function [source]
id

Serialize an ID as the text tmux prints for it.

integer_field ( target : &static str , field : &static str ) IntegerField<T, N>
function [source]
function [source]
integer_field
list ( value : &[OsString] , serializer : S ) Result<S::Ok, S::Error>
function [source]
function [source]
list

The same, for a list of key names an operation sends.

many_relation ( target : &static str , field : &static str ) ManyRelation<From, To>
function [source]
function [source]
many_relation
one_relation ( target : &static str , field : &static str ) OneRelation<From, To>
function [source]
function [source]
one_relation
open ( child : PersistentChild , limits : ControlLimits , timeout : Duration ) Result<OpenedConnection, Error>
function [source]
function [source]
open

Take ownership of a control process and wait until tmux has attached it.

option_schema ( name : &str ) Option<&static OptionSchema>
function [source]
function [source]
option_schema
optional_argument ( value : &Option<OsString> , serializer : S ) Result<S::Ok, S::Error>
function [source]
function [source]
optional_argument
pairs ( value : &[(OsString, OsString)] , serializer : S ) Result<S::Ok, S::Error>
function [source]
function [source]
pairs

The same, for the name/value pairs an operation carries.

pane_id_schema ( generator : &mut schemars::SchemaGenerator ) schemars::Schema
function [source]
function [source]
pane_id_schema
pane_projection_plan ( version : &TmuxVersion ) Result<FormatPlan, FormatCodecError>
function [source]
function [source]
pane_projection_plan
parse_argument ( deserializer : D ) Result<OsString, D::Error>
function [source]
function [source]
parse_argument

Read one argument back.

parse_id ( deserializer : D ) Result<T, D::Error>
function [source]
function [source]
parse_id

Read an ID back from that text.

parse_list ( deserializer : D ) Result<Vec<OsString>, D::Error>
function [source]
function [source]
parse_list

Read that list back.

parse_optional_argument ( deserializer : D ) Result<Option<OsString>, D::Error>
function [source]
function [source]
parse_optional_argument

Read back an argument a command may omit.

parse_pairs ( deserializer : D ) Result<Vec<(OsString, OsString)>, D::Error>
function [source]
function [source]
parse_pairs

Read those pairs back.

read_line ( stdout : &mut R , pending : &mut Vec<u8> , limit : usize ) Result<Option<Line>, Error>
function [source]
function [source]
read_line

Read and classify one protocol line.

pending carries a line across calls. read_until appends what it read before it was cancelled, which is what makes this usable in select! -- read_line would lose those bytes, and would also reject the pane output that is not UTF-8.

read_line_within ( stdout : &mut R , pending : &mut Vec<u8> , limit : usize , within : Option<u64> ) Result<Option<Line>, Error>
function [source]
function [source]
read_line_within

Read one line, classifying it for the block it arrived in.

within names the open block, if any. tmux(1) guarantees a notification never appears inside an output block, so every line but its own terminator is command output -- including one that looks like a notification, which is what list-panes -F '#{pane_id}' produces for every row.

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());
resolve_server_endpoint ( explicit_path : Option<&OsStr> , socket_name : Option<&OsStr> , inputs : EndpointInputs<_> ) Result<ResolvedEndpoint, IdentityError>
function [source]
function [source]
resolve_server_endpoint
resolve_server_identity ( explicit_path : Option<&OsStr> , socket_name : Option<&OsStr> , inputs : EndpointInputs<_> ) Result<ServerIdentity, IdentityError>
function [source]
function [source]
resolve_server_identity
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 Waiting and retrying

scaled ( base : Duration ) Duration
function [source]
function [source]
scaled
session_id_schema ( generator : &mut schemars::SchemaGenerator ) schemars::Schema
function [source]
function [source]
session_id_schema
set_matches ( operator : SetOperator , values : &[T] , candidate : &T ) bool
function [source]
function [source]
set_matches

Evaluate one operator against its operands.

Ordering compares against the single bound has_valid_shape requires; a malformed predicate that reached here matches nothing rather than panicking on an absent bound.

set_once_eq ( cell : &OnceLock<T> , value : T , error_kind : FilterExpressionErrorKind ) Result<(), FilterExpressionError>
function [source]
function [source]
set_once_eq
text_field ( target : &static str , field : &static str ) TextField<T>
function [source]
function [source]
text_field
unescape_output ( source : &[u8] ) Vec<u8>
function [source]
function [source]
unescape_output

Undo the escaping tmux applies to %output.

tmux writes a byte below 0x20 as \ooo and a backslash as \\, and leaves everything else alone -- so a pane emitting Latin-1 or binary produces a line that is not UTF-8. Anything else after a backslash is not an escape tmux produces, so it is kept as written rather than guessed at.

unique_name ( prefix : &str ) String
function [source]
function [source]
unique_name
unknown_field_error ( ) FilterExpressionError
function [source]
function [source]
unknown_field_error
valid_wire_name ( value : &str ) bool
function [source]
function [source]
valid_wire_name
validate_expression ( expression : &ExprData ) Result<(), FilterExpressionError>
function [source]
function [source]
validate_expression
validate_wire_fields ( expression : &ExprData ) Result<(), FilterExpressionError>
function [source]
function [source]
validate_wire_fields
validate_wire_targets ( expression : &ExprData , expected_target : Option<&str> ) Result<(), FilterExpressionError>
function [source]
function [source]
validate_wire_targets
window_id_schema ( generator : &mut schemars::SchemaGenerator ) schemars::Schema
function [source]
function [source]
window_id_schema
window_projection_plan ( version : &TmuxVersion ) Result<FormatPlan, FormatCodecError>
function [source]
function [source]
window_projection_plan
write_line ( stdin : &mut ChildStdin , line : &str ) Result<(), Error>
function [source]
function [source]
write_line

Write one command line to the connection.

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?;
Esc

Type to search.