# cmd_run_shell_exec

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

tmux command: [`run-shell`](/en/tmux/3.7c/manual/run-shell/)

```c
static enum cmd_retval cmd_run_shell_exec(struct cmd *, struct cmdq_item *)
```

## Parameters

- `self` (`struct cmd *`)
- `item` (`struct cmdq_item *`)

## Calls

- [`args_has`](/en/tmux/3.7c/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L135)
- [`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/cmd-run-shell.c#L147)
- [`args_string`](/en/tmux/3.7c/reference/c-function-args_string/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L136)
- [`cmd_get_args`](/en/tmux/3.7c/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L110)
- [`cmdq_error`](/en/tmux/3.7c/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L128)
- [`cmdq_get_client`](/en/tmux/3.7c/reference/c-function-cmdq_get_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L113)
- [`cmdq_get_target`](/en/tmux/3.7c/reference/c-function-cmdq_get_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L111)
- [`cmdq_get_target_client`](/en/tmux/3.7c/reference/c-function-cmdq_get_target_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L114)
- [`format_add`](/en/tmux/3.7c/reference/c-function-format_add/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L141)
- [`format_create_from_target`](/en/tmux/3.7c/reference/c-function-format_create_from_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L138)
- [`format_expand`](/en/tmux/3.7c/reference/c-function-format_expand/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L143)
- [`format_free`](/en/tmux/3.7c/reference/c-function-format_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L144)
- [`session_add_ref`](/en/tmux/3.7c/reference/c-function-session_add_ref/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L175)
- [`xcalloc`](/en/tmux/3.7c/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L134)
- [`xsnprintf`](/en/tmux/3.7c/reference/c-function-xsnprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L140)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L166)

## Other function references

- [`args_count`](/en/tmux/3.7c/reference/c-function-args_count/) (function)
- [`args_get`](/en/tmux/3.7c/reference/c-function-args_get/) (function)
- [`cmd_run_shell_timer`](/en/tmux/3.7c/reference/c-function-cmd-run-shell-c-cmd_run_shell_timer/) (function)
- [`server_client_get_cwd`](/en/tmux/3.7c/reference/c-function-server_client_get_cwd/) (function)

## Referenced by

- [`cmd_run_shell_entry`](/en/tmux/3.7c/reference/c-variable-cmd_run_shell_entry/) (attribute)

## Referenced declarations

- [`cmd_run_shell_data.client`](/en/tmux/3.7c/reference/c-struct-cmd_run_shell_data-client/) (attribute)
- [`cmd`](/en/tmux/3.7c/reference/c-struct-cmd/) (struct)
- [`cmd_run_shell_data.cmd`](/en/tmux/3.7c/reference/c-struct-cmd_run_shell_data-cmd/) (attribute)
- [`CMD_RETURN_ERROR`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_error/) (constant)
- [`CMD_RETURN_NORMAL`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`CMD_RETURN_WAIT`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_wait/) (constant)
- [`cmd_retval`](/en/tmux/3.7c/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/3.7c/reference/c-struct-cmdq_item/) (struct)
- [`cmd_run_shell_data.cwd`](/en/tmux/3.7c/reference/c-struct-cmd_run_shell_data-cwd/) (attribute)
- [`cmd_run_shell_data.flags`](/en/tmux/3.7c/reference/c-struct-cmd_run_shell_data-flags/) (attribute)
- [`window_pane.id`](/en/tmux/3.7c/reference/c-struct-window_pane-id/) (attribute)
- [`cmd_run_shell_data.item`](/en/tmux/3.7c/reference/c-struct-cmd_run_shell_data-item/) (attribute)
- [`JOB_NOWAIT`](/en/tmux/3.7c/reference/c-define-tmux-h-job_nowait/) (constant)
- [`JOB_SHOWSTDERR`](/en/tmux/3.7c/reference/c-define-tmux-h-job_showstderr/) (constant)
- [`client.references`](/en/tmux/3.7c/reference/c-struct-client-references/) (attribute)
- [`cmd_find_state.s`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-s/) (attribute)
- [`cmd_run_shell_data.s`](/en/tmux/3.7c/reference/c-struct-cmd_run_shell_data-s/) (attribute)
- [`cmd_run_shell_data.state`](/en/tmux/3.7c/reference/c-struct-cmd_run_shell_data-state/) (attribute)
- [`cmd_run_shell_data.timer`](/en/tmux/3.7c/reference/c-struct-cmd_run_shell_data-timer/) (attribute)
- [`cmd_find_state.wp`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-wp/) (attribute)
- [`cmd_run_shell_data.wp_id`](/en/tmux/3.7c/reference/c-struct-cmd_run_shell_data-wp_id/) (attribute)
