Server.pipeline
Run several tmux commands in order.
Source and package
- Qualified name
-
Server.pipeline - Module
- server
- Declared in
Server- Package
- libtmux
- Source
- packages/libtmux/src/server.ts
-
Description#
The result is positional:
results[i]holds whatcommands[i]printed, empty for a command that prints nothing. Commands run as separate tmux invocations because arbitrary command output has no alias-independent delimiter.Not atomic. tmux runs the commands in order and stops at the first failure, leaving everything before it applied; the error names the command that failed. Take a
Server.snapshot()afterwards if you need to know what survived.Examples#
const [[first], [second]] = await server.pipeline([["new-window", "-d", "-P", "-F", "#{window_id}"],["new-window", "-d", "-P", "-F", "#{window_id}"],]);
Guides#
Pages that discuss pipeline.