# LibTmux.TmuxChaining.ToRunCommand

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

```
LibTmux.TmuxChaining.ToRunCommand(request: HookRequest, hooks: TmuxHooks) -> TmuxCommand
```

Returns running a hook as one tmux command.

A hook request names a hook without saying what to do with it, so
running and removing are separate here rather than one call that has to
guess which was meant.

## Parameters

- `request` (HookRequest) — Which hook to run.
- `hooks` (TmuxHooks) — The hooks handle whose scope holds it.

## Returns

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

## Raises

- `ArgumentNullException` — An argument is null.
