# tmux_hook:clear/2

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

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

Leave an empty local hook array, masking inherited entries. This differs from `unset/2`, which restores inheritance. Global clear empties that defaults table. Performs I/O; existing effects already queued by tmux are not cancelled.

## Parameters

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

## tmux command

The tmux commands behind `clear/2`.

- [`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)
