# 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/842228310449e879ebcaa3f910597757c9dbffd6/libtmux/src/main/java/io/github/libtmux/CaptureSpec.java#L22
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-capturespec-capturespec/

What part of a pane to read, and how.

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.

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.

## Example

```java
List<String> everything = pane.capture(c -> c.fromStartOfHistory());
List<String> lastTen = pane.capture(c -> c.from(-10));
```

## 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.
