# tmux_select:first/2

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

```
first(Criteria, Selection)
-spec first(criteria(), t(Row)) -> {ok, Row} | none
               when Row :: tmux_model:row().
```

Validate criteria and coverage, then stop at the first local match. Returns none when no row matches; performs no I/O.

## Parameters

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