# cmd_command_prompt_exec

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L81
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-cmd-command-prompt-c-cmd_command_prompt_exec/

tmux command: [`command-prompt`](/en/tmux/latest/manual/command-prompt/)

```c
static enum cmd_retval cmd_command_prompt_exec(struct cmd *, struct cmdq_item *)
```

## Parameters

- `self` (`struct cmd *`)
- `item` (`struct cmdq_item *`)

## Calls

- [`args_count`](/en/tmux/latest/reference/c-function-args_count/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L90)
- [`args_has`](/en/tmux/latest/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L95)
- [`args_make_commands_get_command`](/en/tmux/latest/reference/c-function-args_make_commands_get_command/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L106)
- [`args_make_commands_prepare`](/en/tmux/latest/reference/c-function-args_make_commands_prepare/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L101)
- [`cmd_command_prompt_free`](/en/tmux/latest/reference/c-function-cmd-command-prompt-c-cmd_command_prompt_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L152)
- [`cmd_get_args`](/en/tmux/latest/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L83)
- [`cmdq_error`](/en/tmux/latest/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L151)
- [`cmdq_get_target`](/en/tmux/latest/reference/c-function-cmdq_get_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L85)
- [`cmdq_get_target_client`](/en/tmux/latest/reference/c-function-cmdq_get_target_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L84)
- [`status_prompt_set`](/en/tmux/latest/reference/c-function-status_prompt_set/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L170)
- [`status_prompt_type`](/en/tmux/latest/reference/c-function-status_prompt_type/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L149)
- [`xasprintf`](/en/tmux/latest/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L107)
- [`xcalloc`](/en/tmux/latest/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L98)
- [`xreallocarray`](/en/tmux/latest/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L127)
- [`xstrdup`](/en/tmux/latest/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L110)

## Other function references

- [`args_get`](/en/tmux/latest/reference/c-function-args_get/) (function)
- [`cmd_command_prompt_callback`](/en/tmux/latest/reference/c-function-cmd-command-prompt-c-cmd_command_prompt_callback/) (function)

## Referenced by

- [`cmd_command_prompt_entry`](/en/tmux/latest/reference/c-variable-cmd_command_prompt_entry/) (attribute)

## Referenced declarations

- [`cmd`](/en/tmux/latest/reference/c-struct-cmd/) (struct)
- [`CMD_RETURN_ERROR`](/en/tmux/latest/reference/c-enum-cmd_retval-cmd_return_error/) (constant)
- [`CMD_RETURN_NORMAL`](/en/tmux/latest/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`CMD_RETURN_WAIT`](/en/tmux/latest/reference/c-enum-cmd_retval-cmd_return_wait/) (constant)
- [`cmd_retval`](/en/tmux/latest/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/latest/reference/c-struct-cmdq_item/) (struct)
- [`cmd_command_prompt_cdata.count`](/en/tmux/latest/reference/c-struct-cmd_command_prompt_cdata-count/) (attribute)
- [`cmd_command_prompt_cdata.flags`](/en/tmux/latest/reference/c-struct-cmd_command_prompt_cdata-flags/) (attribute)
- [`cmd_command_prompt_prompt.input`](/en/tmux/latest/reference/c-struct-cmd_command_prompt_prompt-input/) (attribute)
- [`cmd_command_prompt_cdata.item`](/en/tmux/latest/reference/c-struct-cmd_command_prompt_cdata-item/) (attribute)
- [`cmd_command_prompt_prompt.prompt`](/en/tmux/latest/reference/c-struct-cmd_command_prompt_prompt-prompt/) (attribute)
- [`PROMPT_BSPACE_EXIT`](/en/tmux/latest/reference/c-define-tmux-h-prompt_bspace_exit/) (constant)
- [`PROMPT_INCREMENTAL`](/en/tmux/latest/reference/c-define-tmux-h-prompt_incremental/) (constant)
- [`PROMPT_KEY`](/en/tmux/latest/reference/c-define-tmux-h-prompt_key/) (constant)
- [`PROMPT_NOFREEZE`](/en/tmux/latest/reference/c-define-tmux-h-prompt_nofreeze/) (constant)
- [`PROMPT_NUMERIC`](/en/tmux/latest/reference/c-define-tmux-h-prompt_numeric/) (constant)
- [`PROMPT_SINGLE`](/en/tmux/latest/reference/c-define-tmux-h-prompt_single/) (constant)
- [`client.prompt_string`](/en/tmux/latest/reference/c-struct-client-prompt_string/) (attribute)
- [`cmd_command_prompt_cdata.prompt_type`](/en/tmux/latest/reference/c-struct-cmd_command_prompt_cdata-prompt_type/) (attribute)
- [`PROMPT_TYPE_COMMAND`](/en/tmux/latest/reference/c-enum-prompt_type-prompt_type_command/) (constant)
- [`PROMPT_TYPE_INVALID`](/en/tmux/latest/reference/c-enum-prompt_type-prompt_type_invalid/) (constant)
- [`cmd_command_prompt_cdata.prompts`](/en/tmux/latest/reference/c-struct-cmd_command_prompt_cdata-prompts/) (attribute)
- [`cmd_find_state.s`](/en/tmux/latest/reference/c-struct-cmd_find_state-s/) (attribute)
- [`cmd_command_prompt_cdata.state`](/en/tmux/latest/reference/c-struct-cmd_command_prompt_cdata-state/) (attribute)
