# tmux_option:set/3

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_option.erl#L164
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_option-set-3/

```
set(Scope, Key, Value)
-spec set(scope(), key(), binary()) ->
             {ok, tmux_operation:completed()} |
             {error, tmux_operation:failure()}.
```

Set one scalar or indexed array entry with default write options. Performs I/O; see `set/4` for append, only-if-unset, parsing and unknown-outcome semantics.

## Parameters

- `Scope` (`scope()`)
- `Key` (`key()`)
- `Value` (`binary()`)

## tmux command

The tmux commands behind `set/3`.

- [`set-option`](/en/tmux/latest/manual/set-option/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_set_option_entry`](/en/tmux/latest/reference/c-variable-cmd_set_option_entry/) (attribute)
- [`cmd_set_option_exec`](/en/tmux/latest/reference/c-function-cmd-set-option-c-cmd_set_option_exec/) (function)
