# cmd_capture_pane_history

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

```c
static char * cmd_capture_pane_history(struct args *, struct cmdq_item *, struct window_pane *, size_t *)
```

## Parameters

- `args` (`struct args *`)
- `item` (`struct cmdq_item *`)
- `wp` (`struct window_pane *`)
- `len` (`size_t *`)

## Called by

- [`cmd_capture_pane_exec`](/en/tmux/3.7c/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L328)

## 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#L192)
- [`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#L168)
- [`args_strtonum_and_expand`](/en/tmux/3.7c/reference/c-function-args_strtonum_and_expand/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L196)
- [`cmd_capture_pane_append`](/en/tmux/3.7c/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_append/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L267)
- [`cmd_capture_pane_hyperlinks`](/en/tmux/3.7c/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_hyperlinks/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L249)
- [`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#L172)
- [`grid_peek_line`](/en/tmux/3.7c/reference/c-function-grid_peek_line/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L273)
- [`grid_string_cells`](/en/tmux/3.7c/reference/c-function-grid_string_cells/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L252)
- [`xreallocarray`](/en/tmux/3.7c/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L245)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L175)

## Referenced declarations

- [`args`](/en/tmux/3.7c/reference/c-struct-args/) (struct)
- [`window_pane.base`](/en/tmux/3.7c/reference/c-struct-window_pane-base/) (attribute)
- [`cmdq_item`](/en/tmux/3.7c/reference/c-struct-cmdq_item/) (struct)
- [`grid_line.flags`](/en/tmux/3.7c/reference/c-struct-grid_line-flags/) (attribute)
- [`window_mode.get_screen`](/en/tmux/3.7c/reference/c-struct-window_mode-get_screen/) (attribute)
- [`screen.grid`](/en/tmux/3.7c/reference/c-struct-screen-grid/) (attribute)
- [`GRID_LINE_DEAD`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_line_dead/) (constant)
- [`GRID_LINE_EXTENDED`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_line_extended/) (constant)
- [`GRID_LINE_HYPERLINK`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_line_hyperlink/) (constant)
- [`GRID_LINE_START_OUTPUT`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_line_start_output/) (constant)
- [`GRID_LINE_START_PROMPT`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_line_start_prompt/) (constant)
- [`GRID_LINE_WRAPPED`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_line_wrapped/) (constant)
- [`GRID_STRING_EMPTY_CELLS`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_string_empty_cells/) (constant)
- [`GRID_STRING_ESCAPE_SEQUENCES`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_string_escape_sequences/) (constant)
- [`GRID_STRING_TRIM_SPACES`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_string_trim_spaces/) (constant)
- [`GRID_STRING_WITH_SEQUENCES`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_string_with_sequences/) (constant)
- [`grid.hsize`](/en/tmux/3.7c/reference/c-struct-grid-hsize/) (attribute)
- [`window_mode_entry.mode`](/en/tmux/3.7c/reference/c-struct-window_mode_entry-mode/) (attribute)
- [`window_pane.modes`](/en/tmux/3.7c/reference/c-struct-window_pane-modes/) (attribute)
- [`screen.saved_grid`](/en/tmux/3.7c/reference/c-struct-screen-saved_grid/) (attribute)
- [`screen_size_x`](/en/tmux/3.7c/reference/c-define-tmux-h-screen_size_x/) (constant)
- [`grid.sx`](/en/tmux/3.7c/reference/c-struct-grid-sx/) (attribute)
- [`grid.sy`](/en/tmux/3.7c/reference/c-struct-grid-sy/) (attribute)
- [`window_pane`](/en/tmux/3.7c/reference/c-struct-window_pane/) (struct)
- [`window_mode_entry.wp`](/en/tmux/3.7c/reference/c-struct-window_mode_entry-wp/) (attribute)
