libtmux Reference MCP Search
On this page

session.settings.Session.set_hook

View as Markdown

Module
session.settings
Declared in
Session
Package
libtmux
Source
crates/libtmux/src/session/settings.rs
set_hook ( self , name : &str , command : impl Into<OsString> ) Result<(), Error>
method [source]
method [source]
set_hook

Set one hook to a tmux command.

Hooks live in the same option tables, so a hook is an array option and Self::get_option reads it under an indexed name such as after-new-window[0].

Errors

Returns an error when tmux rejects the hook name or command.

Returns crate::Error::OptionScopeMismatch when tmux keeps the option in another of its tables.

0 declared, 0 inherited

Esc

Type to search.