Expand description
A typed, asynchronous client for tmux.
tmux-client invokes the tmux command-line protocol directly. It does not
start a runtime, invoke a shell, or make dropping an object destructive.
use tmux_client::{NewSession, Server};
let server = Server::new();
let session = server
.new_session(NewSession::new().name("example")?.detached(true))
.await?;
assert_eq!(session.name().map(|name| name.as_str()), Some("example"));Modules§
- query
- Typed, in-memory query expressions and iterator extensions.
- test_
support - Rust-native utilities for isolated, real-tmux integration tests.
Structs§
- Attached
Client - A running, interactive
attach-sessionchild process. - Buffer
- An owned snapshot of a tmux paste buffer.
- Buffer
Name - A validated tmux paste-buffer name.
- Capture
Pane - Typed arguments for byte-preserving pane capture.
- Choose
Tree - Typed arguments for
choose-tree. - Client
- A tmux client discovered with
list-clients. - Client
Name - The server-visible name of an attached tmux client.
- Client
Snapshot - An owned tmux ClientSnapshot field snapshot.
- Command
- A tmux subcommand and its arguments.
- Command
Prompt - Typed arguments for
command-prompt. - Command
Result - The raw result of a completed tmux command.
- Command
Summary - A redacted, human-readable command description.
- Confirm
Before - Typed arguments for
confirm-before. - Copy
Mode - Typed arguments for
copy-mode. - Display
Message - Typed arguments for the broad
display-messageflag family. - Find
Window - Typed arguments for
find-window. - Format
Descriptor - Metadata for one tmux format variable.
- IfShell
- Typed arguments for conditional tmux command execution.
- KeyBinding
- Typed arguments for
bind-key. - Menu
- Typed arguments for
display-menu. - Native
Filter - A raw tmux native filter expression passed through via
-f. - NewPane
- Typed arguments for a tmux 3.7+ floating
new-pane. - NewSession
- Typed arguments for creating a session.
- NewWindow
- Typed arguments for creating a window.
- Option
Map - A deterministic map of tmux option names to values.
- Pane
- A tmux pane handle with its parent identities and owned snapshot.
- PaneId
- A validated tmux pane identity.
- Pane
Snapshot - An owned tmux PaneSnapshot field snapshot.
- Paste
Buffer - Typed arguments for
paste-buffer. - Pipe
Pane - Typed arguments for
pipe-pane. - Popup
- Typed arguments for
display-popup. - Release
Version - A released tmux version, including letter suffixes such as
3.2a. - Relocate
Pane - Typed placement arguments shared by
move-paneandjoin-pane. - Respawn
Pane - Typed arguments for
respawn-pane. - Respawn
Window - Typed arguments for
respawn-window. - RunShell
- Typed arguments for
run-shell. - Select
Pane - Typed arguments for
select-pane. - Send
Keys - Typed arguments for
send-keys. - Server
- A cheap handle to one tmux server configuration.
- Server
Builder - Builder for
Server. - Server
Config - Immutable process and socket configuration shared by all object handles.
- Session
- A tmux session handle with an owned snapshot.
- Session
Id - A validated tmux session identity.
- Session
Name - A validated tmux session name.
- Session
Snapshot - An owned tmux SessionSnapshot field snapshot.
- Sparse
Option Map - Sparse indexed option values such as hooks and
command-alias[]. - Split
Pane - Typed arguments for
split-window. - Swap
Pane - Typed arguments for
swap-pane. - Tmux
Text - Text returned by tmux without an implicit UTF-8 conversion.
- Unbind
Key - Typed arguments for
unbind-key. - Window
- A tmux window identity plus one session-specific link and owned snapshot.
- Window
Id - A validated tmux window identity.
- Window
Link - A session-specific link to a window.
- Window
Resize - Typed arguments for the three
resize-windowmodes. - Window
Snapshot - An owned tmux WindowSnapshot field snapshot.
Enums§
- Capture
Line - A numbered capture line or tmux’s
-history/screen boundary. - Client
Permission - A server ACL permission.
- Color
Mode - A tmux client color mode supplied on each command.
- Decoded
Type - The intended decoded representation of a format token.
- Error
- A non-exhaustive error produced by configuration, execution, or parsing.
- Format
Scope - The tmux context needed to resolve a format token.
- Format
Token - A known catalog token or an explicitly requested custom tmux token.
- Format
Value - A value decoded according to a
FormatDescriptor. - Hook
Scope - Scope for hook commands.
- Layout
- A built-in tmux window layout or a caller-provided layout string.
- Menu
Item - One entry in a popup menu.
- Object
Kind - The kind of tmux object involved in an error.
- Option
Error Kind - A category of option parsing or mutation failure.
- Option
Scope - The scope used by tmux option commands.
- Option
Value - A value accepted by tmux’s option and environment commands.
- Pane
Destination - A pane or window that can receive a moved or joined pane.
- Pane
Size - Initial pane size.
- Pane
Target - A target that identifies a pane.
- Prompt
Type - A tmux prompt-history and completion namespace.
- Resize
Direction - Direction for relative pane resizing.
- Rotation
- Direction used by
rotate-window. - Server
Access - A typed
server-accessaction. - Session
Target - A target that identifies a session.
- Socket
- The tmux socket identity used by a server handle.
- Split
Direction - Orientation for a new pane.
- Swap
Pane Direction - Relative direction for
swap-pane. - Tmux
Version - A tmux version reported by
tmux -V. - Tree
Sort - Sort field used by the tree chooser.
- Wait
Action - An operation supported by
wait-for. - Window
Position - Placement relative to a target window.
- Window
Target - A target that identifies a window or a window link.
Traits§
- Snapshot
Fields - Catalog-driven field access shared by every snapshot type.
Functions§
- format_
catalog - Returns the single catalog used for queries and snapshot accessors.
- format_
descriptor - Looks up a known descriptor by exact token name.
Type Aliases§
- Result
- A result returned by
tmux-client.