# LibTmux.Server.IfShellAsync

- **Module:** LibTmux.Server
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Server.Execution.cs#L92
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-server-ifshellasync/

```
LibTmux.Server.IfShellAsync(request: IfShellRequest, cancellationToken: CancellationToken) -> Task
```

Runs one tmux command or another depending on a shell command.

## Parameters

- `request` (IfShellRequest): What to test, and what to run either way.
- `cancellationToken` (CancellationToken): Cancels the tmux command.
