# cmd_capture_pane_exec

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

tmux command: [`capture-pane`](/en/tmux/3.7c/manual/capture-pane/)

tmux command: [`clear-history`](/en/tmux/3.7c/manual/clear-history/)

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

## Parameters

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

## Calls

- [`args_get`](/en/tmux/3.7c/reference/c-function-args_get/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L350)
- [`args_has`](/en/tmux/3.7c/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L319)
- [`cmd_capture_pane_history`](/en/tmux/3.7c/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_history/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L328)
- [`cmd_capture_pane_pending`](/en/tmux/3.7c/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_pending/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L326)
- [`cmd_get_args`](/en/tmux/3.7c/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L309)
- [`cmd_get_entry`](/en/tmux/3.7c/reference/c-function-cmd_get_entry/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L316)
- [`cmdq_error`](/en/tmux/3.7c/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L339)
- [`cmdq_get_client`](/en/tmux/3.7c/reference/c-function-cmdq_get_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L310)
- [`cmdq_get_target`](/en/tmux/3.7c/reference/c-function-cmdq_get_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L311)
- [`control_write`](/en/tmux/3.7c/reference/c-function-control_write/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L336)
- [`file_can_print`](/en/tmux/3.7c/reference/c-function-file_can_print/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L338)
- [`file_print`](/en/tmux/3.7c/reference/c-function-file_print/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L344)
- [`file_print_buffer`](/en/tmux/3.7c/reference/c-function-file_print_buffer/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L343)
- [`grid_clear_history`](/en/tmux/3.7c/reference/c-function-grid_clear_history/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L318)
- [`paste_set`](/en/tmux/3.7c/reference/c-function-paste_set/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L352)
- [`screen_reset_hyperlinks`](/en/tmux/3.7c/reference/c-function-screen_reset_hyperlinks/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L320)
- [`window_pane_reset_mode_all`](/en/tmux/3.7c/reference/c-function-window_pane_reset_mode_all/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L317)

## Referenced by

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

## Referenced declarations

- [`window_pane.base`](/en/tmux/3.7c/reference/c-struct-window_pane-base/) (attribute)
- [`CLIENT_CONTROL`](/en/tmux/3.7c/reference/c-define-tmux-h-client_control/) (constant)
- [`cmd`](/en/tmux/3.7c/reference/c-struct-cmd/) (struct)
- [`cmd_clear_history_entry`](/en/tmux/3.7c/reference/c-variable-cmd_clear_history_entry/) (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_retval`](/en/tmux/3.7c/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/3.7c/reference/c-struct-cmdq_item/) (struct)
- [`client.flags`](/en/tmux/3.7c/reference/c-struct-client-flags/) (attribute)
- [`screen.grid`](/en/tmux/3.7c/reference/c-struct-screen-grid/) (attribute)
- [`window_pane.screen`](/en/tmux/3.7c/reference/c-struct-window_pane-screen/) (attribute)
- [`cmd_find_state.wp`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-wp/) (attribute)
