# cmd_get_source

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

```c
void cmd_get_source(struct cmd *cmd, const char **file, u_int *line)
```

## Parameters

- `cmd` (`struct cmd *`)
- `file` (`const char **`)
- `line` (`u_int *`)

## Called by

- [`args_make_commands_prepare`](/en/tmux/3.7c/reference/c-function-args_make_commands_prepare/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/arguments.c#L797)
- [`cmdq_error`](/en/tmux/3.7c/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L879)

## Referenced declarations

- [`cmd`](/en/tmux/3.7c/reference/c-struct-cmd/) (struct)
- [`cmd.file`](/en/tmux/3.7c/reference/c-struct-cmd-file/) (attribute)
- [`cmd.line`](/en/tmux/3.7c/reference/c-struct-cmd-line/) (attribute)
