# cmd_get_source

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd.c#L407
- **Page:** https://libtmux.org/en/tmux/3.2a/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

- [`cmd_if_shell_exec`](/en/tmux/3.2a/reference/c-function-cmd-if-shell-c-cmd_if_shell_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-if-shell.c#L88)
- [`cmd_run_shell_exec`](/en/tmux/3.2a/reference/c-function-cmd-run-shell-c-cmd_run_shell_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-run-shell.c#L125)
- [`cmdq_error`](/en/tmux/3.2a/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L849)

## Referenced by

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

## Referenced declarations

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