LibTmux.Command (libtmux v0.0.1-alpha.1)

Copy Markdown View Source

A command value with separate argv and tmux-text renderers.

Construction performs no I/O. Arguments are bytes without NUL. Rendering protects command syntax; arguments interpreted as formats still require LibTmux.Format. A command value does not authorize a shared control lane or establish completion behavior, including configured hooks and aliases.

Summary

Types

A positive byte ceiling for the selected argv or text rendering; encoded output is charged separately.

t()

Trusted command data without I/O. Format operands need separate encoding before execution.

Functions

Returns process arguments, preserving terminal semicolons in tmux's argv parser.

Constructs a trusted command, rejecting invalid arguments and input size.

Renders one newline-free tmux command line within its encoded byte budget.

Types

option()

@type option() :: {:max_bytes, pos_integer()}

A positive byte ceiling for the selected argv or text rendering; encoded output is charged separately.

t()

@opaque t()

Trusted command data without I/O. Format operands need separate encoding before execution.

Functions

argv(command, options \\ [])

@spec argv(t(), [option()]) :: [binary()]

Returns process arguments, preserving terminal semicolons in tmux's argv parser.

new(name, args, options \\ [])

@spec new(String.t(), [binary()], [option()]) :: t()

Constructs a trusted command, rejecting invalid arguments and input size.

render(command, options \\ [])

@spec render(t(), [option()]) :: binary()

Renders one newline-free tmux command line within its encoded byte budget.