# Libtmux.Operations.set_option

- **Module:** Libtmux
- **Package:** libtmux
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/lib/libtmux.mli#L1170
- **Public owner:** Libtmux
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux-operations-set_option/

```
val set_option :
  ?index:int ->
  ?append:bool ->
  Options.scope -> name:string -> Options.scalar -> unit Command.t
```

Validate the scope and scalar kind before admission. Array values require an index, or `append:true`. Without an index, tmux splits appended text using the option's separator and fills the lowest unused indexes. Text is literal; tmux format expansion is disabled. Hooks use a separate operation.

## Parameters

- `index?` (`int`)
- `append?` (`bool`)
- `arg1` (`Options.scope`)
- `name` (`string`)
- `arg2` (`Options.scalar`)

## Guides

Pages that discuss `set_option`.

- [Measure capture, concurrency and output delivery](/en/ocaml/latest/guides/benchmarking/)
