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

CommandError

CommandError reports a completed failed high-level tmux operation. It matches ErrCommand through errors.Is; callers can recover its fields with errors.As. Generic library operations retain an owned copy of the completed command and output so tmux diagnostics remain available. Operations whose primary payload may contain secrets return an exit-code-only result instead. Callers must treat retained argv and output as potentially sensitive.

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

Fields2#

CommandError fields
NameTypeDescription
Result CommandResult Result is the owned completed result, or an exit-code-only redacted result for a secret-bearing operation.
Subcommand string Subcommand is the failed tmux subcommand.

Members3#

  • Error method Error implements error.
  • Is method Is reports ErrNoServer for a failure that means no tmux server answered — either the command never reached one, or the one it reached is gone — and ErrNotFound for one tmux refused because the object it named was absent.
  • Unwrap method Unwrap makes CommandError compatible with ErrCommand.
Esc

Type to search.

Reference previewOpen reference