# options_array_set

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L434
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-options_array_set/

```c
int options_array_set(struct options_entry *o, u_int idx, const char *value, int append, char **cause)
```

## Parameters

- `o` (`struct options_entry *`)
- `idx` (`u_int`)
- `value` (`const char *`)
- `append` (`int`)
- `cause` (`char **`)

## Called by

- [`options_array_assign`](/en/tmux/3.7c/reference/c-function-options_array_assign/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L527)
- [`options_default`](/en/tmux/3.7c/reference/c-function-options_default/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L274)
- [`window_customize_set_option_callback`](/en/tmux/3.7c/reference/c-function-window-customize-c-window_customize_set_option_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-customize.c#L1008)

## Calls

- [`cmd_parse_from_string`](/en/tmux/3.7c/reference/c-function-cmd_parse_from_string/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L456)
- [`options_array_free`](/en/tmux/3.7c/reference/c-function-options-c-options_array_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L451)
- [`options_array_new`](/en/tmux/3.7c/reference/c-function-options-c-options_array_new/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L470)
- [`options_value_free`](/en/tmux/3.7c/reference/c-function-options-c-options_value_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L472)
- [`xasprintf`](/en/tmux/3.7c/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L480)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L444)

## Other function references

- [`colour_fromstring`](/en/tmux/3.7c/reference/c-function-colour_fromstring/) (function)

## Referenced by

- [`cmd_set_option_exec`](/en/tmux/3.7c/reference/c-function-cmd-set-option-c-cmd_set_option_exec/) (function)
- [`options_remove_or_default`](/en/tmux/3.7c/reference/c-function-options_remove_or_default/) (function)

## Referenced declarations

- [`CMD_PARSE_ERROR`](/en/tmux/3.7c/reference/c-enum-cmd_parse_status-cmd_parse_error/) (constant)
- [`CMD_PARSE_SUCCESS`](/en/tmux/3.7c/reference/c-enum-cmd_parse_status-cmd_parse_success/) (constant)
- [`cmd_parse_result.cmdlist`](/en/tmux/3.7c/reference/c-struct-cmd_parse_result-cmdlist/) (attribute)
- [`options_value.cmdlist`](/en/tmux/3.7c/reference/c-union-options_value-cmdlist/) (attribute)
- [`cmd_parse_result.error`](/en/tmux/3.7c/reference/c-struct-cmd_parse_result-error/) (attribute)
- [`options_value.number`](/en/tmux/3.7c/reference/c-union-options_value-number/) (attribute)
- [`options_entry`](/en/tmux/3.7c/reference/c-struct-options_entry/) (struct)
- [`OPTIONS_IS_ARRAY`](/en/tmux/3.7c/reference/c-define-options-c-options_is_array/) (constant)
- [`OPTIONS_IS_COMMAND`](/en/tmux/3.7c/reference/c-define-options-c-options_is_command/) (constant)
- [`OPTIONS_IS_STRING`](/en/tmux/3.7c/reference/c-define-options-c-options_is_string/) (constant)
- [`OPTIONS_TABLE_COLOUR`](/en/tmux/3.7c/reference/c-enum-options_table_type-options_table_colour/) (constant)
- [`cmd_parse_result.status`](/en/tmux/3.7c/reference/c-struct-cmd_parse_result-status/) (attribute)
- [`options_value.string`](/en/tmux/3.7c/reference/c-union-options_value-string/) (attribute)
- [`options_entry.tableentry`](/en/tmux/3.7c/reference/c-struct-options_entry-tableentry/) (attribute)
- [`options_table_entry.type`](/en/tmux/3.7c/reference/c-struct-options_table_entry-type/) (attribute)
- [`options_array_item.value`](/en/tmux/3.7c/reference/c-struct-options_array_item-value/) (attribute)
