# io.github.libtmux.CaptureSpec.CaptureSpec

- **Module:** io.github.libtmux.CaptureSpec
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-java/blob/c3517519ee799428a809ce6deb1708c8be289cd1/libtmux/src/main/java/io/github/libtmux/CaptureSpec.java#L22
- **Page:** https://libtmux.org/reference/java/io-github-libtmux-capturespec-capturespec/

What part of a pane to read, and how.

<p>The shape {@link SplitSpec} uses. A plain {@link Pane#capture()} reads what is on screen; this
is how to reach the scrollback above it, or to keep what tmux otherwise strips.

<p>Lines are numbered from the top of the visible area, so {@code 0} is the first row on screen
and negatives climb into the history. {@code fromStartOfHistory()} is the whole of what tmux
kept.

<pre>{@code
List<String> everything = pane.capture(c -> c.fromStartOfHistory());
List<String> lastTen = pane.capture(c -> c.from(-10));
}</pre>

## Members

- `builder` (method) — A builder that reads what is on screen and nothing else.
- `argv` (method) — The command that reads the pane.
- `Builder` (class) — Collects the choices, each named for what it does rather than for the flag it sets.
