# LibTmux.ListHooksRequest.ToCommand

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

```
LibTmux.ListHooksRequest.ToCommand(hooks: TmuxHooks) -> TmuxCommand
```

Returns a hook listing as one tmux command.

A chain returns one combined output stream, so batch a listing to see
what the same invocation just installed. <see cref="TmuxHooks.GetAllAsync" />
answers the same question with the hooks already parsed.

## Parameters

- `hooks` (TmuxHooks): The hooks handle whose scope is listed.

## Returns

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

## Raises

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