session.Session.setHook
- 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>
-
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 });In other ports Bind a command to a session hook
- Python
libtmux.Session.set_hook - Ruby No source-verified Ruby equivalent is recorded for this operation.
- Lua
libtmux.Session:set_hook - Rust
session.Session.set_hook - Go
tmux.Session.SetHook - Java reached through
Session.hooks, whoseHookscarries the write - .NET reached through
Session.Hooks, whoseTmuxHookscarries the write - C++
libtmux::Session::set_hook - Swift
Server.setHook(_:to:at:in:)
- Python
0 declared, 0 inherited