# LibTmux.DisplayMessageRequest.ToCommand

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

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

Returns a message request as one tmux command.

This takes the server because two of the flags depend on which tmux is
answering: literal expansion arrived in 3.4, and 3.2a refuses the
target-client flag even for a client that is really attached.

## Parameters

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

## Returns

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

## Raises

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