# LibTmux.SetOptionRequest.ToCommand

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Requests/SetOptionRequest.cs#L59
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-setoptionrequest-tocommand/

```
LibTmux.SetOptionRequest.ToCommand(options: TmuxOptions) -> TmuxCommand
```

Returns an option request as one tmux command.

This takes the options handle rather than a server, because which
scope flags and target tmux receives follow from the handle the caller
reached for: a window's options and a server's are the same request
spelled differently.

## Parameters

- `options` (`TmuxOptions`): The options handle whose scope the option is set in.

## Returns

The command, ready to add to a <see cref="TmuxChain" />.

## Raises

- [`ArgumentNullException`](https://learn.microsoft.com/dotnet/api/system.argumentnullexception): <paramref name="options" /> is null.
