# LibTmux.TmuxOptions.SetAsync

- **Module:** LibTmux.TmuxOptions
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Options/TmuxOptions.cs#L157
- **Page:** https://libtmux.org/en/dotnet/latest/reference/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.
