# args_make_commands_prepare

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L761
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-args_make_commands_prepare/

```c
struct args_command_state * args_make_commands_prepare(struct cmd *self, struct cmdq_item *item, u_int idx, const char *default_command, int wait, int expand)
```

## Parameters

- `self` (`struct cmd *`)
- `item` (`struct cmdq_item *`)
- `idx` (`u_int`)
- `default_command` (`const char *`)
- `wait` (`int`)
- `expand` (`int`)

## Called by

- [`args_make_commands_now`](/en/tmux/3.7c/reference/c-function-args_make_commands_now/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L747)
- [`cmd_command_prompt_exec`](/en/tmux/3.7c/reference/c-function-cmd-command-prompt-c-cmd_command_prompt_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-command-prompt.c#L101)
- [`cmd_display_panes_exec`](/en/tmux/3.7c/reference/c-function-cmd-display-panes-c-cmd_display_panes_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-display-panes.c#L325)
- [`cmd_if_shell_exec`](/en/tmux/3.7c/reference/c-function-cmd-if-shell-c-cmd_if_shell_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-if-shell.c#L106)
- [`cmd_run_shell_exec`](/en/tmux/3.7c/reference/c-function-cmd-run-shell-c-cmd_run_shell_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L147)

## Calls

- [`cmd_find_copy_state`](/en/tmux/3.7c/reference/c-function-cmd_find_copy_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L803)
- [`cmd_get_args`](/en/tmux/3.7c/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L764)
- [`cmd_get_source`](/en/tmux/3.7c/reference/c-function-cmd_get_source/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L797)
- [`cmdq_get_target`](/en/tmux/3.7c/reference/c-function-cmdq_get_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L765)
- [`cmdq_get_target_client`](/en/tmux/3.7c/reference/c-function-cmdq_get_target_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L766)
- [`fatalx`](/en/tmux/3.7c/reference/c-function-fatalx/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L784)
- [`format_single_from_target`](/en/tmux/3.7c/reference/c-function-format_single_from_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L790)
- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L793)
- [`xcalloc`](/en/tmux/3.7c/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L772)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L792)

## Referenced declarations

- [`args_command_state`](/en/tmux/3.7c/reference/c-struct-args_command_state/) (struct)
- [`ARGS_COMMANDS`](/en/tmux/3.7c/reference/c-enum-args_type-args_commands/) (constant)
- [`cmd_parse_input.c`](/en/tmux/3.7c/reference/c-struct-cmd_parse_input-c/) (attribute)
- [`args_command_state.cmd`](/en/tmux/3.7c/reference/c-struct-args_command_state-cmd/) (attribute)
- [`cmd`](/en/tmux/3.7c/reference/c-struct-cmd/) (struct)
- [`args_command_state.cmdlist`](/en/tmux/3.7c/reference/c-struct-args_command_state-cmdlist/) (attribute)
- [`cmdq_item`](/en/tmux/3.7c/reference/c-struct-cmdq_item/) (struct)
- [`cmd_parse_input.file`](/en/tmux/3.7c/reference/c-struct-cmd_parse_input-file/) (attribute)
- [`cmd_parse_input.fs`](/en/tmux/3.7c/reference/c-struct-cmd_parse_input-fs/) (attribute)
- [`cmd_parse_input.item`](/en/tmux/3.7c/reference/c-struct-cmd_parse_input-item/) (attribute)
- [`cmd_parse_input.line`](/en/tmux/3.7c/reference/c-struct-cmd_parse_input-line/) (attribute)
- [`args_command_state.pi`](/en/tmux/3.7c/reference/c-struct-args_command_state-pi/) (attribute)
- [`client.references`](/en/tmux/3.7c/reference/c-struct-client-references/) (attribute)
- [`cmd_list.references`](/en/tmux/3.7c/reference/c-struct-cmd_list-references/) (attribute)
- [`args_value.type`](/en/tmux/3.7c/reference/c-struct-args_value-type/) (attribute)
- [`args.values`](/en/tmux/3.7c/reference/c-struct-args-values/) (attribute)
