Window.format
Expand a tmux format string in this window's context.
Source and package
- Qualified name
-
libtmux::window:: Window:: format - Module
- window
- Declared in
Window- Package
- libtmux
- Source
- crates/libtmux/src/window.rs
-
- Completion
- Returns a future that runs when awaited.signature · window.rs:970
- Errors
- Returns an error when tmux cannot be reached or refuses the format.doc comment · :949
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 window = session.active_window().await?.expect("a window");let expanded = window.format("#{window_id}").await?;assert_eq!(expanded.to_string_lossy(), window.id().to_string());guard.shutdown().await?;
Recorded calls
source callsThe Rust reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls window.Window.format.
tmux command
task materialThe tmux commands behind format.
tmux C API
task materialThe C declarations in tmux that implement these commands.