# Libtmux.Operations.capture_text

- **Module:** Libtmux
- **Package:** libtmux
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/lib/libtmux.mli#L1078
- **Public owner:** Libtmux
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux-operations-capture_text/

```
val capture_text :
  ?scratch_dir:string ->
  Pane.t -> start:int -> end_:int -> Captured_text.t Command.t
```

Capture inclusive visible rows through an operation-owned temporary file. Require `0 <= start <= end_ < Pane.height pane`; scrollback is excluded. Retained bytes survive client close. The scratch directory must share the daemon filesystem.

## Parameters

- `scratch_dir?` (`string`)
- `arg1` (`Pane.t`)
- `start` (`int`)
- `end_` (`int`)
