Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

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

View as Markdown

Module
io.github.libtmux.PaneCommand
Package
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/PaneCommand.java
class io.github.libtmux.PaneCommand.PaneCommand
classreadonly [source]
classreadonly [source]
class 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 $? and then signals a private 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 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.

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.

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-for channel 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.
Esc

Type to search.