Action
Shared results for explicit pane, window and session actions.
Source and package
- Qualified name
-
LibTmux .Action - Module
- LibTmux
- Package
- libtmux
- Source
- lib/libtmux/action.ex
-
Description#
Pass a
LibTmux.Serverfor one-shot execution or aLibTmux.Controlfor managed execution in its qualified connection. No action changes transport, replays a mutation or refreshes an observation. One-shot actions check the server incarnation before execution; that check leaves a check/use race.Ordinary actions return completed, failed, skipped and unknown outcomes.
valueis populated only for a completed command;detailsretains the transport's original bounded evidence. Domain bang functions return the completed value or raiseLibTmux.Action.CompletionErrorwith the original unsuccessful result. Acknowledgement does not prove that a program processed input or finished running.API errors use
LibTmux.Error; admitted control errors preserve the recovery handle inLibTmux.Control.ExecutionError. Domain bang functions raise these errors unchanged. Lower-levelLibTmux.ControlandLibTmux.Operationbang functions retain canonical outcomes as values.Action errors with kind
:invalid_commandinclude a validationpathsuch as[:options, :size]and a boundeddetails.reasondescribing accepted inputs. The reason appears in the exception message; rejected values are not retained in diagnostic details.A nonzero one-shot client exit reports
:failedwith:observedcertainty: its exit status is observed, not an authenticated tmux command reply or proof that no effects occurred.Optional session context checks physical membership at tmux's command resolution. It does not bind a particular WindowLink index when a window has multiple links in that session. WindowLink references are rejected. See
LibTmux.Pane.split/3,LibTmux.Pane.send_text/4andLibTmux.Window.rename/4for caller examples.
Members4#
- connection/0: connection() ::
Lib
Tmux () | Lib.Server .t Tmux () typealias Explicitly selected one-shot descriptor or pinned qualified connection..Control .t - error/0: error() ::
Lib
Tmux () | Lib.Error .t Tmux () typealias An API refusal or a managed execution error retaining its recovery context..Control .Execution Error .t - option/0: option() ::
{:timeout, 1..600_000} | {:session, Lib
Tmux ()} typealias A 1..600000ms execution budget, default 5000ms; optional exact session context for physical targets..Ref .t - result/1: result(value) ::
%{
outcome: :completed,
certainty: Lib
Tmux (), evidence: atom(), transport: :one_shot | :control, value: value, details: map() } | %{ outcome: :failed | :skipped | :unknown, certainty: Lib.Error .certainty Tmux (), evidence: atom(), transport: :one_shot | :control, value: nil, details: map() } typealias Canonical action outcome and original transport evidence..Error .certainty