# tmux_select:where/2

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

```
where(Criteria, Selection)
-spec where(criteria(), t(Row)) -> t(Row)
               when Row :: tmux_model:row().
```

Validate portable criteria and coverage, then preserve matching rows in order. Performs no I/O. Malformed trusted criteria raise bad_filter; missing coverage and runtime evaluation failures remain distinct exceptions. Use `try_where/2` for tagged library errors.

## Parameters

- `Criteria` (`criteria()`)
- `Selection` (`t(Row)`)
