# LibTmux.Server.IfShellAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Server.Execution.cs#L95
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-server-ifshellasync/

tmux command: [`if-shell`](/en/tmux/latest/manual/if-shell/)

```
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.
