# options_scope_from_flags

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

```c
int options_scope_from_flags(struct args *args, int window, struct cmd_find_state *fs, struct options **oo, char **cause)
```

## Parameters

- `args` (`struct args *`)
- `window` (`int`)
- `fs` (`struct cmd_find_state *`)
- `oo` (`struct options **`)
- `cause` (`char **`)

## Called by

- [`cmd_show_options_exec`](/en/tmux/latest/reference/c-function-cmd-show-options-c-cmd_show_options_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-show-options.c#L89)
- [`options_scope_from_name`](/en/tmux/latest/reference/c-function-options_scope_from_name/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L863)

## Calls

- [`args_get`](/en/tmux/latest/reference/c-function-args_get/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L928)
- [`args_has`](/en/tmux/latest/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L930)
- [`xasprintf`](/en/tmux/latest/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options.c#L938)

## Referenced declarations

- [`args`](/en/tmux/latest/reference/c-struct-args/) (struct)
- [`cmd_find_state`](/en/tmux/latest/reference/c-struct-cmd_find_state/) (struct)
- [`global_options`](/en/tmux/latest/reference/c-variable-global_options/) (attribute)
- [`global_s_options`](/en/tmux/latest/reference/c-variable-global_s_options/) (attribute)
- [`global_w_options`](/en/tmux/latest/reference/c-variable-global_w_options/) (attribute)
- [`options`](/en/tmux/latest/reference/c-struct-options/) (struct)
- [`session.options`](/en/tmux/latest/reference/c-struct-session-options/) (attribute)
- [`window_pane.options`](/en/tmux/latest/reference/c-struct-window_pane-options/) (attribute)
- [`window.options`](/en/tmux/latest/reference/c-struct-window-options/) (attribute)
- [`OPTIONS_TABLE_NONE`](/en/tmux/latest/reference/c-define-tmux-h-options_table_none/) (constant)
- [`OPTIONS_TABLE_PANE`](/en/tmux/latest/reference/c-define-tmux-h-options_table_pane/) (constant)
- [`OPTIONS_TABLE_SERVER`](/en/tmux/latest/reference/c-define-tmux-h-options_table_server/) (constant)
- [`OPTIONS_TABLE_SESSION`](/en/tmux/latest/reference/c-define-tmux-h-options_table_session/) (constant)
- [`OPTIONS_TABLE_WINDOW`](/en/tmux/latest/reference/c-define-tmux-h-options_table_window/) (constant)
- [`cmd_find_state.s`](/en/tmux/latest/reference/c-struct-cmd_find_state-s/) (attribute)
- [`winlink.window`](/en/tmux/latest/reference/c-struct-winlink-window/) (attribute)
- [`cmd_find_state.wl`](/en/tmux/latest/reference/c-struct-cmd_find_state-wl/) (attribute)
- [`cmd_find_state.wp`](/en/tmux/latest/reference/c-struct-cmd_find_state-wp/) (attribute)
