Examples
Run these complete shell scripts to send input, capture output, and build workspace layouts. Each page builds its script one tmux command at a time, then shows the whole file. Each example states its requirements, includes its setup, and cleans up the private tmux server it creates.
Save the displayed files with their shown names and run the command below them. The scripts use explicit sockets and targets so their commands reach the server and pane they created. Capture examples use completion signals before reading output.
Use send-keys,
capture-pane, and
source-file for their command syntax.
Guides explains variations and failure handling.
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.
Build a workspace from a file
Create a session, windows, and panes from a tmux command file.
Source and verification
The displayed shell files are the source for these native tmux examples; a site build does not execute them. Each step block is a range of lines quoted from the page’s complete file when the site is built, and the build fails if the range no longer resolves. Each page links the tmux manual for the commands it uses.
For a page listed in
site/test/fixtures/guide-examples.json,
scripts/check-example-prose.py
checks its displayed file hashes and setup
commands, then executes the recorded shell recipe with the tmux executable
found on the shell’s path. Its result records the tmux version, page and file
hashes, exit status, and any missing expected output. A receipt covers only the exact
program, tmux version, and host prerequisites used in that run; it does not
establish execution of other examples or other versions.