Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

struct libtmux-go latest

RunResult

RunResult reports how a command finished and what its terminal showed.

Source and package
Qualified name
tmux.RunResult
Package
tmux
Distribution
github.com/libtmux/libtmux-go/tmux
Source
tmux/session_run.go
struct tmux.RunResult

Fields4#

RunResult fields
NameTypeDescription
Lines []string Lines is what the terminal showed when the command finished, its history included, without the blank lines tmux pads a screen with. A line the window's width wrapped is joined back into one, and each line ends at its last character that is not a space: a screen cannot tell spaces a program wrote from the blank cells after them. tmux keeps at most the session's history-limit lines above the screen, 2000 by default, so the start of a longer output is gone.
Pane PaneID Pane is the pane the command ran in. It is live only when the run kept its window.
Signal os.Signal Signal is the signal that ended the command, when one did, and nil otherwise. Compare it with os.Kill or a syscall constant: tmux reports a number on Linux and a name on macOS and the BSDs, and Signal holds the same value on each.
Status int Status is the command's exit status, or -1 when the command did not exit on its own, as when a signal ended it, so zero always means it succeeded. os.ProcessState.ExitCode reads the same way.
Esc

Type to search.

Reference previewOpen reference