# cmdq_fire_command

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L597
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-cmd-queue-c-cmdq_fire_command/

```c
static enum cmd_retval cmdq_fire_command(struct cmdq_item *item)
```

## Parameters

- `item` (`struct cmdq_item *`)

## Called by

- [`cmdq_next`](/en/tmux/3.7c/reference/c-function-cmdq_next/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L774)

## Calls

- [`cmd_find_client`](/en/tmux/3.7c/reference/c-function-cmd_find_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L622)
- [`cmd_find_valid_state`](/en/tmux/3.7c/reference/c-function-cmd_find_valid_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L654)
- [`cmd_get_args`](/en/tmux/3.7c/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L602)
- [`cmd_get_entry`](/en/tmux/3.7c/reference/c-function-cmd_get_entry/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L603)
- [`cmd_print`](/en/tmux/3.7c/reference/c-function-cmd_print/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L613)
- [`cmdq_add_message`](/en/tmux/3.7c/reference/c-function-cmd-queue-c-cmdq_add_message/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L611)
- [`cmdq_find_flag`](/en/tmux/3.7c/reference/c-function-cmd-queue-c-cmdq_find_flag/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L642)
- [`cmdq_guard`](/en/tmux/3.7c/reference/c-function-cmdq_guard/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L619)
- [`cmdq_insert_hook`](/en/tmux/3.7c/reference/c-function-cmdq_insert_hook/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L662)
- [`cmdq_name`](/en/tmux/3.7c/reference/c-function-cmd-queue-c-cmdq_name/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L599)
- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L614)
- [`log_get_level`](/en/tmux/3.7c/reference/c-function-log_get_level/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L612)

## Other function references

- [`args_get`](/en/tmux/3.7c/reference/c-function-args_get/) (function)
- [`cmd_find_from_client`](/en/tmux/3.7c/reference/c-function-cmd_find_from_client/) (function)

## Referenced declarations

- [`cfg_finished`](/en/tmux/3.7c/reference/c-variable-cfg_finished/) (attribute)
- [`cmdq_item.client`](/en/tmux/3.7c/reference/c-struct-cmdq_item-client/) (attribute)
- [`cmdq_item.cmd`](/en/tmux/3.7c/reference/c-struct-cmdq_item-cmd/) (attribute)
- [`CMD_AFTERHOOK`](/en/tmux/3.7c/reference/c-define-tmux-h-cmd_afterhook/) (constant)
- [`CMD_CLIENT_CANFAIL`](/en/tmux/3.7c/reference/c-define-tmux-h-cmd_client_canfail/) (constant)
- [`CMD_CLIENT_CFLAG`](/en/tmux/3.7c/reference/c-define-tmux-h-cmd_client_cflag/) (constant)
- [`CMD_CLIENT_TFLAG`](/en/tmux/3.7c/reference/c-define-tmux-h-cmd_client_tflag/) (constant)
- [`CMD_RETURN_ERROR`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_error/) (constant)
- [`cmd_retval`](/en/tmux/3.7c/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/3.7c/reference/c-struct-cmdq_item/) (struct)
- [`CMDQ_STATE_CONTROL`](/en/tmux/3.7c/reference/c-define-tmux-h-cmdq_state_control/) (constant)
- [`cmdq_state.current`](/en/tmux/3.7c/reference/c-struct-cmdq_state-current/) (attribute)
- [`cmd_entry.exec`](/en/tmux/3.7c/reference/c-struct-cmd_entry-exec/) (attribute)
- [`cmd_entry.flags`](/en/tmux/3.7c/reference/c-struct-cmd_entry-flags/) (attribute)
- [`cmd_find_state.flags`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-flags/) (attribute)
- [`cmdq_state.flags`](/en/tmux/3.7c/reference/c-struct-cmdq_state-flags/) (attribute)
- [`cmdq_item.group`](/en/tmux/3.7c/reference/c-struct-cmdq_item-group/) (attribute)
- [`cmd_entry.name`](/en/tmux/3.7c/reference/c-struct-cmd_entry-name/) (attribute)
- [`client.retval`](/en/tmux/3.7c/reference/c-struct-client-retval/) (attribute)
- [`cmd_find_state.s`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-s/) (attribute)
- [`cmd_entry.source`](/en/tmux/3.7c/reference/c-struct-cmd_entry-source/) (attribute)
- [`cmdq_item.source`](/en/tmux/3.7c/reference/c-struct-cmdq_item-source/) (attribute)
- [`cmdq_item.state`](/en/tmux/3.7c/reference/c-struct-cmdq_item-state/) (attribute)
- [`cmd_entry.target`](/en/tmux/3.7c/reference/c-struct-cmd_entry-target/) (attribute)
- [`cmdq_item.target`](/en/tmux/3.7c/reference/c-struct-cmdq_item-target/) (attribute)
- [`cmdq_item.target_client`](/en/tmux/3.7c/reference/c-struct-cmdq_item-target_client/) (attribute)
