# command.CommandChain.summary

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

```
command.CommandChain.summary(self) -> CommandSummary
```

Build a bounded, sanitized summary of the whole chain.

Separators render bare and are counted as neither public nor sensitive
arguments. Every other token of every member, including the subcommands
after the first, counts as an argument of the summary.

## Example

```rust
use libtmux::{Command, CommandChain};

let summary = CommandChain::new(Command::new("select-pane").arg("-m"))
    .then(Command::new("select-pane").arg("-M"))
    .summary();

assert_eq!(summary.to_string(), r#""select-pane" "-m" ; "select-pane" "-M""#);
assert_eq!(summary.public_argument_count(), 3);
```
