# tmux_select:matching/2

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

```
matching/2
-spec matching({module(), term()}, t(Row)) ->
                  {ok, t(Row)} | {error, term()}
                  when Row :: tmux_model:row().
```

Prepare a trusted behaviour once, then apply its Boolean predicate.

Uses `c:tmux_matcher:prepare/2`; preparation failure returns {error, Detail}.
Exceptions in either callback propagate. A matcher requires a captured
snapshot; a `from_list/2` selection returns matcher_requires_snapshot. The
application chooses Module.

## Parameters

- `Argument1` (`{module(), term()}`)
- `Selection` (`t(Row)`)
