session.Session.set_hook
- Module
- session
- Declared in
- Session
- Package
- libtmux
- Source
- crates/libtmux/src/session/settings.rs
- Other languages
- Python Ruby LuaTypeScriptGo Java .NET C++Swift
-
Set one hook to a tmux command.
Hooks live in the same option tables, so a hook is an array option and
Self::typed_optionreads it under an indexed name such asafter-new-window[0].Errors
Returns an error when tmux rejects the hook name or command.
Returns
crate::Error::OptionScopeMismatchwhen tmux keeps the option in another of its tables.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 - TypeScript
session.Session.setHook - 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