# LibTmux.TmuxOptions.SetAsync

- **Module:** LibTmux.TmuxOptions
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Options/TmuxOptions.cs#L141
- **Page:** https://libtmux.org/reference/dotnet/libtmux-tmuxoptions-setasync/

```
LibTmux.TmuxOptions.SetAsync(request: SetOptionRequest, cancellationToken: CancellationToken) -> Task<TmuxOptionValue>
```

Sets one option.

The value is read back rather than echoed, because tmux does not always
store what it was given: an appended value joins what was there, and a
format is expanded before it lands.

## Parameters

- `request` (SetOptionRequest) — Which option to set, to what, and how.
- `cancellationToken` (CancellationToken) — Cancels the tmux commands.

## Returns

The value tmux holds afterwards.

## Raises

- `TmuxOptionException` — tmux rejected the option or its value.
