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

CommandResult

CommandResult contains one completed tmux invocation. Server.Cmd returns it even when tmux exits nonzero. Library operations clone its slices before returning it, so the caller owns Command, Stdout, RawStdout, and Stderr.

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

Fields5#

CommandResult fields
NameTypeDescription
Command []string Command is the executed tmux argument vector.
ExitCode int ExitCode is tmux's completed process exit code, or -1 when no tmux command ran: this package refused the request, or a transport failed before tmux answered. A negative code is therefore never tmux's opinion of the request, and an error carrying one has a reason of its own.
RawStdout []byte RawStdout contains exact captured standard-output bytes, including line delimiters and trailing newlines. It is nil when no output was captured.
Stderr []string Stderr contains one decoded standard-error line per element.
Stdout []string Stdout contains one decoded standard-output line per element.
Esc

Type to search.

Reference previewOpen reference