Session.showHooks
Every hook this session reports.
Source and package
-
Description#
A hook is an array of commands, keyed by the name
setHook()takes, so what was set reads back under the name it was set with. tmux prints each element asname[0], which composes with neither of the writers.Examples#
const hooks = await session.showHooks();hooks.get("window-linked")?.[0];
tmux command#
The tmux commands behind showHooks.
tmux C API#
The C declarations in tmux that implement these commands.
tmux hooks#
Events that run tmux commands, with the scope each hook belongs to and where tmux fires it.
In other ports#
Read a session's hooks
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Rust | session |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | libtmux:: |
| Swift | Server |
No equivalent is recorded in PowerShell, Julia, Elixir, Kotlin, Scala or F#.