# 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/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/server.go#L99
- **Page:** https://libtmux.org/en/go/latest/reference/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.
