Examples
Send input, capture output, query a snapshot, or schedule commands. Each example links its source or explains how to run the complete program.
Attach and send keys
Find a session, send a command, and read its output.
Capture pane output
Read a pane's screen and wait for output to appear.
Filter a window snapshot
Select one match and handle missing or ambiguous results.
Command senders
Use the optional stdexec adapter to release a pending command.
Build a workspace from a file
Create a session, windows, and panes from configuration.
Source and verification
Port repositories use the following checks for their source examples. This site reads or copies those examples; a successful site build alone does not execute them:
The port’s README example check compares quoted code and output with the source files. CTest builds and runs the example programs.
See Testing with libtmux for the fixture each of those test suites runs against, and each example page for the exact file a given snippet was quoted from.