# libtmux:capture-pane-bytes

- **Package:** libtmux
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/operations.lisp#L50
- **Public owner:** libtmux
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-capture-pane-bytes/

```
(capture-pane-bytes client pane &key start end join-lines escape-sequences escape-controls alternate pending-output cancel-token timeout output-limit)
```

Read PANE now; return owned output octets and the diagnostic command outcome.
START/END accept signed line numbers or :ALL for the corresponding history edge.
JOIN-LINES joins wrapped rows; ESCAPE-SEQUENCES retains terminal styles;
ESCAPE-CONTROLS asks tmux to render controls as octal; ALTERNATE selects its
alternate screen; PENDING-OUTPUT requests tmux's pending input bytes. Tmux owns
these capture modes and may reject unavailable combinations. Does not decode or
trim bytes. Signals STALE-TARGET or an operational condition with its outcome.

## Parameters

- `client`
- `pane`
- `start?`
- `end?`
- `join-lines?`
- `escape-sequences?`
- `escape-controls?`
- `alternate?`
- `pending-output?`
- `cancel-token?`
- `timeout?`
- `output-limit?`

## tmux command

The tmux commands behind `capture-pane-bytes`.

- [`capture-pane`](/en/tmux/latest/manual/capture-pane/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_capture_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_capture_pane_entry/) (attribute)
- [`cmd_capture_pane_exec`](/en/tmux/latest/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_exec/) (function)

## Guides

Pages that discuss `capture-pane-bytes`.

- [Explicit operations](/en/lisp/latest/guides/operations/)
- [REPL tutorial](/en/lisp/latest/guides/tutorial/)
