Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

window.Window.set_hook

Rust

View as Markdown

Module
window
Declared in
Window
Package
libtmux
Source
crates/libtmux/src/window/settings.rs
Other languages
PythonTypeScriptGo Java .NET C++ Swift
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::typed_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.

Discussed in Options and hooks

In other ports Bind a command to a window hook

0 declared, 0 inherited

Esc

Type to search.