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

server.Server.setHook

TypeScript

View as Markdown

Module
server
Declared in
Server
Package
libtmux
Source
packages/libtmux/src/server.ts
Other languages
Python Ruby LuaRust Go Java .NET C++ Swift
setHook ( name : : string , command : : string , options : : SetHookOptions ) → Promise<void>
method [source]
method [source]
setHook

Bind a tmux command to a global hook.

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

Examples

await server.setHook("session-created", "display-message 'hello'");
await server.setHook("session-created", "display-message 'and this'", { append: true });
In other ports Bind a command to a global hook

0 declared, 0 inherited

Esc

Type to search.