# cmd_parse

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

```c
struct cmd * cmd_parse(struct args_value *values, u_int count, const char *file, u_int line, int parse_flags, char **cause)
```

## Parameters

- `values` (`struct args_value *`)
- `count` (`u_int`)
- `file` (`const char *`)
- `line` (`u_int`)
- `parse_flags` (`int`)
- `cause` (`char **`)

## Calls

- [`cmd_find`](/en/tmux/3.7c/reference/c-function-cmd_find/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd.c#L522)
- [`xasprintf`](/en/tmux/3.7c/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd.c#L519)
- [`xcalloc`](/en/tmux/3.7c/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd.c#L537)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd.c#L543)

## Referenced declarations

- [`cmd_entry.args`](/en/tmux/3.7c/reference/c-struct-cmd_entry-args/) (attribute)
- [`cmd.args`](/en/tmux/3.7c/reference/c-struct-cmd-args/) (attribute)
- [`ARGS_STRING`](/en/tmux/3.7c/reference/c-enum-args_type-args_string/) (constant)
- [`args_value`](/en/tmux/3.7c/reference/c-struct-args_value/) (struct)
- [`cmd`](/en/tmux/3.7c/reference/c-struct-cmd/) (struct)
- [`args.count`](/en/tmux/3.7c/reference/c-struct-args-count/) (attribute)
- [`cmd.entry`](/en/tmux/3.7c/reference/c-struct-cmd-entry/) (attribute)
- [`cmd.file`](/en/tmux/3.7c/reference/c-struct-cmd-file/) (attribute)
- [`cmd.line`](/en/tmux/3.7c/reference/c-struct-cmd-line/) (attribute)
- [`cmd_entry.name`](/en/tmux/3.7c/reference/c-struct-cmd_entry-name/) (attribute)
- [`cmd.parse_flags`](/en/tmux/3.7c/reference/c-struct-cmd-parse_flags/) (attribute)
- [`cmd_entry.usage`](/en/tmux/3.7c/reference/c-struct-cmd_entry-usage/) (attribute)
- [`args.values`](/en/tmux/3.7c/reference/c-struct-args-values/) (attribute)
