# io.github.libtmux.Pane.Pane.expand

- **Module:** io.github.libtmux.Pane.Pane
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/c3517519ee799428a809ce6deb1708c8be289cd1/libtmux/src/main/java/io/github/libtmux/Pane.java#L356
- **Page:** https://libtmux.org/reference/java/io-github-libtmux-pane-pane-expand/

```
io.github.libtmux.Pane.Pane.expand(format: String) -> String
```

Expands a tmux format in this pane's context, and answers with what it came to.

<p>The way out of this library. Snapshots carry the fields worth carrying; a format reaches
everything else tmux knows, including fields added by a release this code has never heard of.

<pre>{@code
String title = pane.expand("#{pane_title}");
String where = pane.expand("#{session_name}:#{window_index}.#{pane_index}");
}</pre>

## Parameters

- `format` (String) — a tmux format, usually of the shape {@code #{name}}

## Returns

the expansion, whole when it spans lines and empty when the format expanded to nothing
