# mode_tree_run_command

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/mode-tree.c#L1467
- **Page:** https://libtmux.org/en/tmux/latest/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/latest/reference/c-function-window-buffer-c-window_buffer_do_paste/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-buffer.c#L459)
- [`window_client_key`](/en/tmux/latest/reference/c-function-window-client-c-window_client_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-client.c#L384)
- [`window_tree_command_each`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_command_each/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1051)
- [`window_tree_key`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1339)

## Calls

- [`cmd_parse_and_append`](/en/tmux/latest/reference/c-function-cmd_parse_and_append/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/mode-tree.c#L1477)
- [`cmd_template_replace`](/en/tmux/latest/reference/c-function-cmd_template_replace/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/mode-tree.c#L1474)
- [`cmdq_free_state`](/en/tmux/latest/reference/c-function-cmdq_free_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/mode-tree.c#L1485)
- [`cmdq_new_state`](/en/tmux/latest/reference/c-function-cmdq_new_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/mode-tree.c#L1476)
- [`status_message_set`](/en/tmux/latest/reference/c-function-status_message_set/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/mode-tree.c#L1481)

## Referenced declarations

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