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

ConnectedServer.subscribeFormat

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

Source and package
Qualified name
ConnectedServer.subscribeFormat
Module
types
Declared in
ConnectedServer
Package
libtmux
Source
packages/libtmux/src/types.ts

Description#

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",
});
Parameters
Raises
  • TypeError – when 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.

Esc

Type to search.

Reference previewOpen reference