# pane.Pane.cmd

- **Module:** pane
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/pane.ts#L762
- **Page:** https://libtmux.org/en/ts/latest/reference/pane-pane-cmd/

```
cmd(
  command: string,
  args: readonly string[] = [],
  options?: CmdOptions,
): Promise<readonly string[]>
```

Run a tmux command this package does not model, addressed at this pane.

The pane's id is sent as the target; pass `target` to address something
else, or [`null`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/null) for a command that takes none.

## Examples

```ts
await pane.cmd("clock-mode");
```

## Parameters

- `command` (`string`)
- `args` (`readonly string[]`)
  Default: `[]`.
- `options?` (`CmdOptions`)

## In other ports

Run a tmux command addressed at a pane

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.cmd`](/en/py/latest/reference/libtmux-pane-cmd/) (method) |
| Rust | [`pane.Pane.cmd`](/en/rs/latest/reference/pane-pane-cmd/) (method) |
| Go | [`tmux.Pane.Cmd`](/en/go/latest/reference/tmux-pane-cmd/) (method) |
| Java | no equivalent on `Pane` |
| C# | no equivalent on `Pane` |
| C++ | no equivalent on `Pane` |
| Swift | no equivalent on `Pane` |

No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Elixir, Kotlin, Scala or F#.
