On this page
server.Server.pipeline
- Module
- server
- Declared in
- Server
- Package
- @libtmux/libtmux
- Source
- packages/libtmux/src/server.ts
-
Run several tmux commands in order.
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.snapshotafterwards 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}"], ]);Discussed in Control mode vs one-shot
0 declared, 0 inherited