# cmd_list_commands

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-commands.c#L74
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-cmd-list-commands-c-cmd_list_commands/

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

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

## Parameters

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

## Calls

- [`args_string`](/en/tmux/latest/reference/c-function-args_string/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-commands.c#L89)
- [`cmd_find`](/en/tmux/latest/reference/c-function-cmd_find/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-commands.c#L94)
- [`cmd_get_args`](/en/tmux/latest/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-commands.c#L76)
- [`cmd_list_single_command`](/en/tmux/latest/reference/c-function-cmd-list-commands-c-cmd_list_single_command/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-commands.c#L92)
- [`cmdq_error`](/en/tmux/latest/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-commands.c#L98)
- [`format_defaults`](/en/tmux/latest/reference/c-function-format_defaults/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-commands.c#L87)
- [`format_free`](/en/tmux/latest/reference/c-function-format_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-commands.c#L100)

## Other function references

- [`args_get`](/en/tmux/latest/reference/c-function-args_get/) (function)
- [`cmdq_get_client`](/en/tmux/latest/reference/c-function-cmdq_get_client/) (function)
- [`format_create`](/en/tmux/latest/reference/c-function-format_create/) (function)

## Referenced by

- [`cmd_list_commands_entry`](/en/tmux/latest/reference/c-variable-cmd_list_commands_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_retval`](/en/tmux/latest/reference/c-enum-cmd_retval/) (enum)
- [`cmd_table`](/en/tmux/latest/reference/c-variable-cmd_table/) (attribute)
- [`cmdq_item`](/en/tmux/latest/reference/c-struct-cmdq_item/) (struct)
- [`FORMAT_NONE`](/en/tmux/latest/reference/c-define-tmux-h-format_none/) (constant)
- [`format_tree.item`](/en/tmux/latest/reference/c-struct-format_tree-item/) (attribute)
- [`LIST_COMMANDS_TEMPLATE`](/en/tmux/latest/reference/c-define-cmd-list-commands-c-list_commands_template/) (constant)
