LibTmux.Control.Request (libtmux v0.1.3)

Copy Markdown View Source

Data for the qualified control lane's supported commands.

Field reads encode one named variable losslessly. Server user options accept literal binary values. Domain actions use the same lane for split, rename and literal/named input. Constructing a request performs no I/O; use LibTmux.Control.execute/3 or retain a handle with LibTmux.Control.submit/3. The host must qualify hooks, aliases and mode-dependent input bindings along with other stream writers. Arbitrary commands, formats and raw control lines require separate qualification and are not accepted by this lane.

Summary

Types

t()

Command data for the qualified lane; construction does not validate admission or perform I/O.

Functions

Reads a named format variable, optionally from an exact instance-bound target.

Sets a server user option with an @name and a literal binary value.

Checks a qualified request's reply shape; a tmux error reply remains a command outcome.

Types

t()

@opaque t()

Command data for the qualified lane; construction does not validate admission or perform I/O.

Functions

field(variable, target \\ nil)

@spec field(String.t(), LibTmux.Ref.t() | nil) :: t()

Reads a named format variable, optionally from an exact instance-bound target.

Existing empty fields succeed. A target that disappears before the read produces an acknowledged failed operation and leaves the connection usable. A reference does not reserve the object's lifetime.

See the worked example.

set_user_option(name, value)

@spec set_user_option(String.t(), binary()) :: t()

Sets a server user option with an @name and a literal binary value.

See the worked example.

verify_reply(request, status, lines)

@spec verify_reply(t(), :ok | :error, [binary()]) :: :ok | {:error, LibTmux.Error.t()}

Checks a qualified request's reply shape; a tmux error reply remains a command outcome.

See the worked example.