# io.github.libtmux.kotlin.Pane.run

- **Module:** io.github.libtmux.kotlin
- **Package:** io.github.libtmux:libtmux-kotlin
- **Language:** Kotlin
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/f56392b5d9bc7f1f9c1631842333fb90f3d82d40/libtmux-kotlin/src/main/kotlin/io/github/libtmux/kotlin/Pane.kt#L127
- **Page:** https://libtmux.org/en/kotlin/latest/reference/io-github-libtmux-kotlin-pane-run/

```
public suspend fun run(
        command: String,
        timeout: Duration,
        dispatcher: CoroutineDispatcher = Dispatchers.IO,
    ): PaneRun
```

Runs a shell command in this pane to its end, and answers with its exit status and output.

Cancelling the coroutine interrupts the wait. The command keeps running in the pane; only the
wait for its end is what cancellation reaches.

## Parameters

- `command` (`String`): a line of shell, run as `eval` would run it
- `timeout` (`Duration`): how long to wait for it to end
- `dispatcher` (`CoroutineDispatcher`): where the blocking wait runs

## Returns

the command's exit status and what it printed
