# command.CommandResult.command

- **Module:** command.CommandResult
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/command.rs#L1016
- **Page:** https://libtmux.org/en/rs/latest/reference/command-commandresult-command/

```
command.CommandResult.command(self) -> &CommandSummary
```

Return the sanitized logical command summary.

## Example

```rust
let server = libtmux::Server::builder().socket_path("/tmp/libtmux-rs-test/result-command.sock").build()?;
let result = server.cmd(libtmux::Command::new("list-sessions")).await?;
assert_eq!(result.command().to_string(), r#""list-sessions""#);
server.shutdown().await?;
```
