# LibTmux.Server.RunShellAsync

- **Module:** LibTmux.Server
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Server.Execution.cs#L63
- **Page:** https://libtmux.org/reference/dotnet/libtmux-server-runshellasync/

```
LibTmux.Server.RunShellAsync(request: RunShellRequest, cancellationToken: CancellationToken) -> Task<IReadOnlyList<string>?>
```

Runs a shell command and reports what it printed.

The directory flag arrived in tmux 3.4, the error-output flag in 3.6,
and passing arguments without a shell in 3.7.

## Parameters

- `request` (RunShellRequest) — What to run, and how.
- `cancellationToken` (CancellationToken) — Cancels the tmux command.

## Returns

What the command printed, or null when tmux did not wait for it.
