# libtmux::Chain

- **Module:** libtmux
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/393d4b0ad666f18a6581f1eb281741a75a7503f0/include/libtmux/chain.hpp#L98
- **Page:** https://libtmux.org/en/cxx/latest/reference/libtmux-chain/

Several commands built up and sent as one tmux invocation.

tmux runs a chain until a command fails and discards the rest, so the chain is the unit of atomicity a caller gets — and the reply count alone cannot say which command failed.

## Members

- `new_session` (method)
- `new_window` (method)
- `split_window` (method)
- `send_text` (method): Literal text, never interpreted as key names or formats.
- `send_key` (method)
- `command` (method): Escape hatch for a command the typed steps do not cover.
- `valid` (method)
- `error` (method)
- `batch` (method)
