# tmux.Server.Cmd

- **Module:** tmux.Server
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/server.go#L95
- **Page:** https://libtmux.org/reference/go/tmux-server-cmd/

```
tmux.Server.Cmd(ctx: context.Context, args: string) -> (CommandResult, error)
```

Cmd executes raw tmux arguments and returns caller-owned result slices. A completed nonzero exit remains a result; validation and transport failures return errors. Cancellation cannot prove whether a mutation reached tmux.

An argument that is exactly ";" separates two tmux commands, so one call can
submit a command list. tmux runs a list until a command fails and drops the
rest, and answers with one merged stdout, so a caller that needs to know
which command produced which line submits them separately. A list means the
same thing through either execution binding.

Only a standalone ";" separates commands. Other semicolons follow the selected
binding's parsing; typed operations keep values literal across bindings.
