# mode_tree_run_command

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/mode-tree.c#L1193
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-mode_tree_run_command/

```c
void mode_tree_run_command(struct client *c, struct cmd_find_state *fs, const char *template, const char *name)
```

## Parameters

- `c` (`struct client *`)
- `fs` (`struct cmd_find_state *`)
- `template` (`const char *`)
- `name` (`const char *`)

## Called by

- [`window_buffer_do_paste`](/en/tmux/3.2a/reference/c-function-window-buffer-c-window_buffer_do_paste/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-buffer.c#L425)
- [`window_client_key`](/en/tmux/3.2a/reference/c-function-window-client-c-window_client_key/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-client.c#L408)
- [`window_tree_command_each`](/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_command_each/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L1047)
- [`window_tree_key`](/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_key/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L1328)

## Calls

- [`cmd_parse_and_append`](/en/tmux/3.2a/reference/c-function-cmd_parse_and_append/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/mode-tree.c#L1203)
- [`cmd_template_replace`](/en/tmux/3.2a/reference/c-function-cmd_template_replace/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/mode-tree.c#L1200)
- [`cmdq_free_state`](/en/tmux/3.2a/reference/c-function-cmdq_free_state/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/mode-tree.c#L1211)
- [`cmdq_new_state`](/en/tmux/3.2a/reference/c-function-cmdq_new_state/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/mode-tree.c#L1202)
- [`status_message_set`](/en/tmux/3.2a/reference/c-function-status_message_set/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/mode-tree.c#L1207)

## Referenced declarations

- [`client`](/en/tmux/3.2a/reference/c-struct-client/) (struct)
- [`cmd_find_state`](/en/tmux/3.2a/reference/c-struct-cmd_find_state/) (struct)
- [`CMD_PARSE_ERROR`](/en/tmux/3.2a/reference/c-enum-cmd_parse_status-cmd_parse_error/) (constant)
