# tmux.CommandTrace

- **Module:** tmux
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/observer.go#L35
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-commandtrace/

CommandTrace records one completed attempt to run a tmux command. It carries neither the argument vector nor tmux's output, both of which may hold passwords, tokens, or pane contents; [CommandError] is where a caller that accepts that reads them.

## Members

- `Subcommand` (attribute): Subcommand is the tmux subcommand, such as "list-sessions". A raw command list reports its first subcommand.
- `Transport` (attribute): Transport names how the command reached tmux.
- `Duration` (attribute): Duration is how long the attempt took.
- `ExitCode` (attribute): ExitCode is tmux's exit code, or -1 when no tmux command ran.
- `Err` (attribute): Err is the transport or validation failure, if any. A completed tmux command that failed leaves this nil and reports through ExitCode.
- `String` (method): String implements fmt.Stringer.
