# LibTmux.CapturePaneRequest.ToCommand

- **Module:** LibTmux.CapturePaneRequest
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Requests/CapturePaneRequest.cs#L86
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-capturepanerequest-tocommand/

```
LibTmux.CapturePaneRequest.ToCommand(pane: Pane) -> TmuxCommand
```

Returns a capture request as one tmux command.

Several capture flags arrived after tmux 3.2a, and the pane is what
knows which tmux is answering, so the command it builds carries only
the flags that server accepts.

## Parameters

- `pane` (Pane): The pane being captured.

## Returns

The command, ready to add to a <see cref="TmuxChain" />.

## Raises

- `ArgumentNullException`: <paramref name="pane" /> is null.
