Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

session.Session.setHook

TypeScript

View as Markdown

Module
session
Declared in
Session
Package
libtmux
Source
packages/libtmux/src/session.ts
Other languages
Python Ruby LuaRustGo Java .NET C++Swift
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 });
In other ports Bind a command to a session hook

0 declared, 0 inherited

Esc

Type to search.