# cmd_capture_pane_exec

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L193
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_exec/

tmux command: [`capture-pane`](/en/tmux/3.2a/manual/capture-pane/)

tmux command: [`clear-history`](/en/tmux/3.2a/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.2a/reference/c-function-args_get/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L234)
- [`args_has`](/en/tmux/3.2a/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L209)
- [`cmd_capture_pane_history`](/en/tmux/3.2a/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_history/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L212)
- [`cmd_capture_pane_pending`](/en/tmux/3.2a/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_pending/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L210)
- [`cmd_get_args`](/en/tmux/3.2a/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L195)
- [`cmd_get_entry`](/en/tmux/3.2a/reference/c-function-cmd_get_entry/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L202)
- [`cmdq_error`](/en/tmux/3.2a/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L223)
- [`cmdq_get_client`](/en/tmux/3.2a/reference/c-function-cmdq_get_client/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L196)
- [`cmdq_get_target`](/en/tmux/3.2a/reference/c-function-cmdq_get_target/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L197)
- [`control_write`](/en/tmux/3.2a/reference/c-function-control_write/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L220)
- [`file_can_print`](/en/tmux/3.2a/reference/c-function-file_can_print/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L222)
- [`file_print`](/en/tmux/3.2a/reference/c-function-file_print/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L228)
- [`file_print_buffer`](/en/tmux/3.2a/reference/c-function-file_print_buffer/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L227)
- [`grid_clear_history`](/en/tmux/3.2a/reference/c-function-grid_clear_history/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L204)
- [`paste_set`](/en/tmux/3.2a/reference/c-function-paste_set/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L236)
- [`window_pane_reset_mode_all`](/en/tmux/3.2a/reference/c-function-window_pane_reset_mode_all/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L203)

## Referenced by

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

## Referenced declarations

- [`window_pane.base`](/en/tmux/3.2a/reference/c-struct-window_pane-base/) (attribute)
- [`CLIENT_CONTROL`](/en/tmux/3.2a/reference/c-define-tmux-h-client_control/) (constant)
- [`cmd`](/en/tmux/3.2a/reference/c-struct-cmd/) (struct)
- [`cmd_clear_history_entry`](/en/tmux/3.2a/reference/c-variable-cmd_clear_history_entry/) (attribute)
- [`CMD_RETURN_ERROR`](/en/tmux/3.2a/reference/c-enum-cmd_retval-cmd_return_error/) (constant)
- [`CMD_RETURN_NORMAL`](/en/tmux/3.2a/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`cmd_retval`](/en/tmux/3.2a/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/3.2a/reference/c-struct-cmdq_item/) (struct)
- [`client.flags`](/en/tmux/3.2a/reference/c-struct-client-flags/) (attribute)
- [`screen.grid`](/en/tmux/3.2a/reference/c-struct-screen-grid/) (attribute)
- [`cmd_find_state.wp`](/en/tmux/3.2a/reference/c-struct-cmd_find_state-wp/) (attribute)
