libtmux Reference MCP Search
On this page

types.ConnectedServer.subscribeFormat

View as Markdown

Module
types
Declared in
ConnectedServer
Package
@libtmux/libtmux
Source
packages/libtmux/src/types.ts
subscribeFormat ( subscription : : FormatSubscription ) Promise<void>
method [source]
method [source]
subscribeFormat

Report a format whenever tmux expands it to a new value.

Reports arrive on subscribe as TmuxSubscriptionEvent . Re-using a name replaces that subscription. The connection re-issues its subscriptions after a reconnect, because they belong to the control client that went away.

Examples

await live.subscribeFormat({
  format: "#{pane_current_command}",
  name: "cmd",
  scope: "all-panes",
});
Raises
  • TypeErrorwhen the name holds :, whitespace, or a control character, or the format holds a line break — each of which tmux would either misread or report unattributably.

0 declared, 0 inherited

Esc

Type to search.