# LibTmux.TmuxChaining.ToCommand

- **Module:** LibTmux.TmuxChaining
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Chaining/TmuxChaining.Hooks.cs#L13
- **Page:** https://libtmux.org/reference/dotnet/libtmux-tmuxchaining-tocommand/

```
LibTmux.TmuxChaining.ToCommand(request: SetHookRequest, hooks: TmuxHooks) -> TmuxCommand
```

Returns a hook request as one tmux command.

## Parameters

- `request` (SetHookRequest) — Which hook to set, and to what.
- `hooks` (TmuxHooks) — The hooks handle whose scope the hook is set in.

## Returns

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

## Raises

- `ArgumentNullException` — An argument is null.
