On this page
session.settings.Session.hook
- Module
- session.settings
- Declared in
- Session
- Package
- libtmux
- Source
- crates/libtmux/src/session/settings.rs
-
Read one hook's commands, or
Nonewhen it holds nothing.Errors
Returns an error when tmux cannot be reached or refuses the listing.
Examples
let guard = libtmux::test::TestServer::new().await?; let session = guard.server().new_session("hooked").await?; assert!(session.hook("alert-bell").await?.is_none()); session.set_hook("alert-bell", "display-message rang").await?; assert!(session.hook("alert-bell").await?.is_some()); guard.shutdown().await?;
0 declared, 0 inherited