io.github.libtmux.PaneCommand.PaneCommand
Java
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- io.github.libtmux.PaneCommand
- Package
- io.github.libtmux:libtmux
- Source
- libtmux/src/main/java/io/github/libtmux/PaneCommand.java
-
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
$?and then signals a privatewait-forchannel 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 withC-cends 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.
Pane#runis 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.
8 declared, 0 inherited
Members
- status method The exit status a row carries at its end, or empty when the row does not end in one.
- channel method The
wait-forchannel the typed line signals once the command has ended. - frame method What lies between the two markers, and the status the end marker carried.
- Framed struct A run's output as read back from the screen.
- fresh method A run with markers and a channel no other run shares.
- quote method One word, quoted so a POSIX shell reads it as exactly the text given.
- requirePosixShell method Refuses a pane whose shell would not read the typed line as written.
- typed method The line to type.