Server.showHooks
Every global hook tmux currently 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 server.showHooks();hooks.get("session-created")?.[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 the server's global hooks
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Rust | server |
| Go | no equivalent on Server |
| Java | io |
| C# | Lib |
| C++ | libtmux:: |
| Swift | Server |
No equivalent is recorded in PowerShell, Julia, Elixir, Kotlin, Scala or F#.