# cmd_copy

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

```c
struct cmd * cmd_copy(struct cmd *cmd, int argc, char **argv)
```

## Parameters

- `cmd` (`struct cmd *`)
- `argc` (`int`)
- `argv` (`char **`)

## Called by

- [`cmd_list_copy`](/en/tmux/3.7c/reference/c-function-cmd_list_copy/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd.c#L670)

## Calls

- [`args_copy`](/en/tmux/3.7c/reference/c-function-args_copy/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd.c#L567)
- [`xcalloc`](/en/tmux/3.7c/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd.c#L565)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd.c#L570)

## Referenced declarations

- [`cmd.args`](/en/tmux/3.7c/reference/c-struct-cmd-args/) (attribute)
- [`cmd`](/en/tmux/3.7c/reference/c-struct-cmd/) (struct)
- [`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)
