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

Session.cmd

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

Source and package
Qualified name
Session.cmd
Module
session
Declared in
Session
Package
libtmux
Source
packages/libtmux/src/session.ts
Other languages
PowerShell Julia Elixir Python Ruby Lua RustGo Java C# C++ Swift Kotlin Scala F#
cmd( command: string, args: readonly string[] = [], options?: CmdOptions, ): Promise<readonly string[]>

Description#

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"]);
Parameters

In other ports#

Run a tmux command addressed at a session

Equivalents of Run a tmux command addressed at a session in other languages
Language Equivalent
Python libtmux.Session.cmd
Rust session.Session.cmd
Go tmux.Session.Cmd
Java no equivalent on Session
C# no equivalent on Session
C++ no equivalent on Session
Swift no equivalent on Session

No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Elixir, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference