Session.format
Expand a tmux format string in this session's context.
Source and package
- Qualified name
-
libtmux::session:: Session:: format - Module
- session
- Declared in
Session- Package
- libtmux
- Source
- crates/libtmux/src/session.rs
-
Description#
This returns
display-messageoutput instead of showing it in front of a person withSelf::display(). Seecrate::Server::format()for the shell boundary around command and recursive formats.Errors
Returns an error when tmux cannot be reached or refuses the format.
Examples#
let guard = libtmux::test::TestServer::new().await?;let session = guard.server().new_session("shown").await?;let expanded = session.format("#{session_name}").await?;assert_eq!(expanded.to_string_lossy(), "shown");guard.shutdown().await?;
tmux command#
The tmux commands behind format.
tmux C API#
The C declarations in tmux that implement these commands.