# workspace.Command

- **Module:** workspace
- **Package:** github.com/libtmux/libtmux-go/workspace
- **Language:** Go
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/workspace/command.go#L13
- **Page:** https://libtmux.org/en/go/latest/workspace/reference/workspace-command/

Command is one command to run in a pane. YAML accepts either a bare string or a mapping, so "echo hi" and {cmd: echo hi, sleep_before: 2} are both commands.

## Members

- `Command` (attribute): Command is the text typed into the pane.
- `SleepBefore` (attribute): SleepBefore delays this command. YAML expresses the duration in seconds, so 0.5 is half a second.
- `SleepAfter` (attribute): SleepAfter delays the commands that follow this one, in the same units.
- `Enter` (attribute): Enter reports whether to press Enter after the command. Nil presses it, matching tmuxp, where omitting enter runs the command.
- `UnmarshalYAML` (method): UnmarshalYAML decodes a command written as a bare string or as a mapping.
