# LibTmux.CommandPromptRequest.ToCommand

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

```
LibTmux.CommandPromptRequest.ToCommand(server: Server) -> TmuxCommand
```

Returns a prompt request as one tmux command.

Batching does not soften the refusal below tmux 3.3: that version reads
the type flag as something else, so a prompt asking for one is refused
here exactly as it is when run alone.

## Parameters

- `server` (Server): The server the prompt is shown on.

## Returns

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

## Raises

- `ArgumentNullException`: <paramref name="server" /> is null.
- `TmuxVersionTooLowException`: The request asks for a format or a prompt type and tmux is older than 3.3.
