# LibTmux.TmuxChain

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Chaining/TmuxChain.cs#L20
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-tmuxchain/

Commands tmux runs together, in one process.

A one-shot call starts a tmux client, runs one command, and lets it exit,
which is the right shape for one command and the wrong shape for fifty: the
process start dominates. A chain hands tmux the whole sequence at once, so
the cost is paid once no matter how many commands are in it.

Building a chain reaches nothing; only <see cref="ExecuteAsync" /> does.
Each step returns a new chain, so a partly built one can be shared without
another caller's additions appearing in it.

## Members

- `Commands` (property): Gets the commands this chain will run, in order.
- `Then` (method): Adds one command and returns the longer chain.
- `ExecuteAsync` (method): Runs every command in one tmux invocation.
