# io.github.libtmux.PaneCommand.PaneCommand

- **Module:** io.github.libtmux.PaneCommand
- **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/PaneCommand.java#L31
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-panecommand-panecommand/

The line typed at a pane's shell to run one command to its end, and how its output is read back.

Completion is not inferred from the screen. The command runs in a subshell whose trap prints an
end marker carrying {@code $?} and then signals a private {@code wait-for} channel through the
same tmux binary and socket, so the wait is tmux's own and the status is the shell's. The trap
covers interrupt and terminate as well as exit, so a command someone stops with {@code C-c} ends
the run and reports the status it was stopped with — commonly 130 — rather than leaving a wait
with nothing to end it.

The output is cut out by framing: a start marker is printed before the command and the end
marker after it, and only lines strictly between them are returned. The shell echoes the whole
typed line, which contains both markers — but only inside quotes, never as a line of its own that
equals a marker, so matching complete marker lines tells plumbing from output even when the echo
wraps.

{@link Pane#run} is built on this, and it is public for a caller that needs the same framing
around orchestration of its own — the MCP server holds a pane for other clients while a run is
uncertain, which the library has no reason to.

## Members

- `fresh` (method): A run with markers and a channel no other run shares.
- `channel` (method): The {@code wait-for} channel the typed line signals once the command has ended.
- `typed` (method): The line to type.
- `frame` (method): What lies between the two markers, and the status the end marker carried.
- `status` (method): The exit status a row carries at its end, or empty when the row does not end in one.
- `Framed` (struct): A run's output as read back from the screen.
- `requirePosixShell` (method): Refuses a pane whose shell would not read the typed line as written.
- `quote` (method): One word, quoted so a POSIX shell reads it as exactly the text given.
