# io.github.libtmux.Server.Server.runShellCapturing

- **Module:** io.github.libtmux.Server.Server
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/842228310449e879ebcaa3f910597757c9dbffd6/libtmux/src/main/java/io/github/libtmux/Server.java#L396
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-server-server-runshellcapturing/

```
io.github.libtmux.Server.Server.runShellCapturing(command: String) -> List<String>
```

Runs a shell command through tmux and answers with what it printed.

Separate from {@link #runShell} because tmux 3.3a and 3.4 run the command and then report
nothing, on every attempt. A caller who wants the effect is fine there; a caller who wants the
output would silently get none, so this one refuses rather than answering emptily.

tmux expands {@code #(...)} in this command before a shell sees it, and shell quoting does
not prevent that. Pass any interpolated value through {@link TmuxFormats#literal} unless you
mean it to be expanded.

## Raises

- `UnsupportedTmuxVersionException`: on the releases that lose the output
