# tmux_pane:resize_command/2

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

```
resize_command(Pane, Options)
-spec resize_command(tmux_model:pane(), resize_options()) ->
                        {ok, tmux_command:t()} |
                        {error, map()}.
```

Build a resize command without tmux I/O. Uses the dimensions and validation rules of `resize/2`, preserving the row's captured origin and stable pane ID. Endpoint liveness and native layout constraints are checked during execution. Submit through `tmux_server:command/3` or `tmux_operation:start/3`.

## Examples

```erlang
1> tmux_pane:resize_command(invalid_row, #{}).
{error,#{code => empty_resize}}
```

## Parameters

- `Pane` (`tmux_model:pane()`)
- `Options` (`resize_options()`)
