On this page
server.Server.cmd
- Module
- server
- Declared in
- Server
- Package
- libtmux
- Source
- crates/libtmux/src/server.rs
- cmd ( self , command : Command ) Result<CommandResult, Error>
-
Execute one raw logical tmux command.
A non-zero process exit status is returned in [
CommandResult]. This raw boundary does not probe or enforce the supported-version floor; callers opt into that check withServer::capabilities.Errors
Returns an error when the process cannot be started, captured, awaited, or is cancelled by timeout or shutdown.
Examples
let server = libtmux::Server::builder() .socket_path("/tmp/libtmux-rs-test/command-example-absent.sock") .build()?; let result = server.cmd(libtmux::Command::new("list-sessions")).await?; assert!(result.exit_code().is_some()); server.shutdown().await?;
0 declared, 0 inherited