On this page
session.Session.setHook
- Module
- session
- Declared in
- Session
- Package
- @libtmux/libtmux
- Source
- packages/libtmux/src/session.ts
- setHook ( name : : string , command : : string , options : : SetHookOptions ) Promise<void>
-
Bind a tmux command to a hook on this session.
A hook holds a list of commands. Without
appendthis 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