Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-ts latest

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
pipeline( commands: readonly (readonly string[])[], options?: CommandOptions, ): Promise<readonly (readonly string[])[]>

Description#

The result is positional: results[i] holds what commands[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}"],
]);
Parameters

Guides#

Pages that discuss pipeline.

Esc

Type to search.

Reference previewOpen reference