# tmux_hook:get/3

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

```
get(Scope, Key, Options)
-spec get(scope(),
          tmux_option:key(),
          tmux_option:read_options()) ->
             {ok, value()} | none | {error, map()}.
```

Read a builtin hook array or indexed entry. Options follow `t:tmux_option:read_options/0`: local-only by default, inherit = true follows its parent tables. Missing local arrays or entries return none; an empty local array returns {ok, #{}} and masks inheritance.

Values are tmux's command-list serialization, including its quoting and escape
sequences. They are neither the original input text nor individual decoded
arguments. Reading does not execute them. Use `set/3` for validated command
values and `unset/2` to restore inheritance. Performs I/O and preserves backend
errors; a vanished target is not an absent hook.

## Parameters

- `Scope` (`scope()`)
- `Key` (`tmux_option:key()`)
- `Options` (`tmux_option:read_options()`)

## tmux command

The tmux commands behind `get/3`.

- [`show-options`](/en/tmux/latest/manual/show-options/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_show_options_entry`](/en/tmux/latest/reference/c-variable-cmd_show_options_entry/) (attribute)
- [`cmd_show_options_exec`](/en/tmux/latest/reference/c-function-cmd-show-options-c-cmd_show_options_exec/) (function)

## Guides

Pages that discuss `get/3`.

- [Read and change scoped options](/en/erlang/latest/guides/options/)
