# tmux_hook:append/3

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

```
append(Scope, Name0, Commands)
-spec append(scope(), binary(), commands()) ->
                {ok, tmux_operation:completed()} |
                {error, tmux_operation:failure()}.
```

Store commands at tmux's first vacant local index for the unindexed name. A new local array starts independently of inherited entries; this does not copy the parent's array. The command result does not report the chosen index; `get/3` observes current entries separately. Performs I/O with the parsing and unknown-outcome semantics of `set/3`.

## Parameters

- `Scope` (`scope()`)
- `Name0` (`binary()`)
- `Commands` (`commands()`)

## tmux command

The tmux commands behind `append/3`.

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

## tmux C API

The C declarations in tmux that implement these commands.

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