# tmux_matcher

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_matcher.erl#L1
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_matcher/

Prepare a trusted local predicate once for a captured snapshot.

Use `tmux_select:matching/2` with `{Module, State}`. The application chooses
Module; external filter documents cannot select the `c:prepare/2`
callback. Preparation returns a unary Boolean function or a tagged error.
Callback exceptions propagate. The adapter does not make executable predicates
portable or push them to tmux.

## Members

### Other members

- [`prepare/2`](/en/erlang/latest/reference/c-tmux_matcher-prepare-2/) (function): Prepare a local Boolean predicate once for this captured snapshot. Return a tagged preparation error when the matcher cannot operate. Callback exceptions remain application failures; this does not make a matcher portable or suitable for untrusted module selection.

## Guides

Pages that discuss `tmux_matcher`.

- [Native API documentation](/en/erlang/latest/guides/api-documentation/)
