libtmux Reference MCP Search
On this page

session.Session.cmd

View as Markdown

Module
session
Declared in
Session
Package
@libtmux/libtmux
Source
packages/libtmux/src/session.ts
cmd ( command : : string , args : : readonly string[] = [] , options : : CmdOptions ) Promise<readonly string[]>
method [source]
method [source]
cmd

Run a tmux command this package does not model, addressed at this session.

The first argument is the tmux command name and nothing else — this does not parse a command line, so arguments go in the array:

The session's id is sent as the target; pass target to address something else, or null for a command that takes none.

Examples

await session.cmd("rename-session", ["--", "renamed"]);

0 declared, 0 inherited

Esc

Type to search.