libtmux Reference MCP Search
On this page

session.Session.setHook

View as Markdown

Module
session
Declared in
Session
Package
@libtmux/libtmux
Source
packages/libtmux/src/session.ts
setHook ( name : : string , command : : string , options : : SetHookOptions ) Promise<void>
method [source]
method [source]
setHook

Bind a tmux command to a hook on this session.

A hook holds a list of commands. Without append this writes the whole list, so it replaces whatever the hook already ran.

Examples

await session.setHook("window-linked", "display-message 'linked'");
await session.setHook("window-linked", "display-message 'twice'", { append: true });

0 declared, 0 inherited

Esc

Type to search.