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

session.Session.set_hook

Rust

View as Markdown

Module
session
Declared in
Session
Package
libtmux
Source
crates/libtmux/src/session/settings.rs
Other languages
Python Ruby LuaTypeScriptGo 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.

In other ports Bind a command to a session hook

0 declared, 0 inherited

Esc

Type to search.