Core LibraryalphaAPI Reference

Choose documentation 1

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

function libtmux-elixir latest

Format.field/1

Encodes one named field for LibTmux.Codec.decode_field/3 with encoding: :escaped_v1.

Source and package
Qualified name
LibTmux.Format.field/1
Module
LibTmux
Declared in
Format
Package
libtmux
Source
lib/libtmux/format.ex
field(name) @spec field(String.t()) :: binary()

Description#

Backslashes are replaced first, then dollars and ASCII control bytes. This protects values from tmux 3.4's ambiguous print escaping. The v1: prefix and encoded newlines prevent field text from becoming reply guards. This encodes one field. Capture composes these fields inside its versioned row framing; this is not an arbitrary format wrapper. The caller must still bound the response and validate the field against its schema and the connected server's capabilities.

See the worked example.

Parameters

Discussed in Command and field encoding

Esc

Type to search.

Reference preview Open reference