# cmd_parse

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L498
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-cmd_parse/

```c
struct cmd * cmd_parse(int argc, char **argv, const char *file, u_int line, char **cause)
```

## Parameters

- `argc` (`int`)
- `argv` (`char **`)
- `file` (`const char *`)
- `line` (`u_int`)
- `cause` (`char **`)

## Calls

- [`args_free`](/en/tmux/3.2a/reference/c-function-args_free/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L540)
- [`args_parse`](/en/tmux/3.2a/reference/c-function-args_parse/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L516)
- [`cmd_copy_argv`](/en/tmux/3.2a/reference/c-function-cmd_copy_argv/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L534)
- [`cmd_find`](/en/tmux/3.2a/reference/c-function-cmd-c-cmd_find/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L511)
- [`cmd_log_argv`](/en/tmux/3.2a/reference/c-function-cmd_log_argv/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L514)
- [`xasprintf`](/en/tmux/3.2a/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L506)
- [`xcalloc`](/en/tmux/3.2a/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L524)
- [`xstrdup`](/en/tmux/3.2a/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L529)

## Referenced by

- [`tty_cmd_erasecharacter`](/en/tmux/3.2a/reference/c-function-tty_cmd_erasecharacter/) (function)

## Referenced declarations

- [`cmd.alias`](/en/tmux/3.2a/reference/c-struct-cmd-alias/) (attribute)
- [`args.argc`](/en/tmux/3.2a/reference/c-struct-args-argc/) (attribute)
- [`cmd.argc`](/en/tmux/3.2a/reference/c-struct-cmd-argc/) (attribute)
- [`cmd_entry.args`](/en/tmux/3.2a/reference/c-struct-cmd_entry-args/) (attribute)
- [`cmd.args`](/en/tmux/3.2a/reference/c-struct-cmd-args/) (attribute)
- [`args.argv`](/en/tmux/3.2a/reference/c-struct-args-argv/) (attribute)
- [`cmd.argv`](/en/tmux/3.2a/reference/c-struct-cmd-argv/) (attribute)
- [`cmd`](/en/tmux/3.2a/reference/c-struct-cmd/) (struct)
- [`cmd.entry`](/en/tmux/3.2a/reference/c-struct-cmd-entry/) (attribute)
- [`cmd.file`](/en/tmux/3.2a/reference/c-struct-cmd-file/) (attribute)
- [`cmd.line`](/en/tmux/3.2a/reference/c-struct-cmd-line/) (attribute)
- [`cmd_entry.name`](/en/tmux/3.2a/reference/c-struct-cmd_entry-name/) (attribute)
- [`cmd_entry.usage`](/en/tmux/3.2a/reference/c-struct-cmd_entry-usage/) (attribute)
