tmux_command:to_config/1
Render validated commands as native configuration text, without I/O. Accepts one command, a sequence/1 value, or a nonempty flat list of at most 256 commands. Returns an ASCII binary of at most 32 KiB, without a final newline. Validation uses validate/1; escaping growth, command count and aggregate size can return command_limit. Lists use native command separators between independently quoted commands. Rendering does not execute them or provide atomic execution or rollback. The text carries no origin token; executing serialized configuration requires the caller to choose and validate its destination explicitly.
Source and package
- Qualified name
-
tmux_command: to _config/1 - Declared in
tmux_command- Package
- libtmux_erlang
- Source
- apps/libtmux_erlang/src/tmux_command.erl
-
Description#
Each argument is doublequoted. Quote, backslash, dollar, tilde, control and non-ASCII bytes use three-digit octal escapes. Empty arguments, semicolons, newlines and non-UTF-8 byte values remain argument data. The lexer does not expand their variables or tilde prefixes, strip newline indentation, or interpret them as directives, comments or additional commands.
Protection covers one lexer pass. Native command-string arguments, including
bind-keyandset-hookvalues, can be parsed again by the receiving command. Render each inner command string separately for its own parse boundary.This is tmux configuration syntax, separate from
argv/1executable arguments and shell quoting. Native commands still interpret their values and expand formats as usual;literal_format/2handles that separate boundary when literal format values are required. Load the text explicitly withsource_file/2, or store it through a native command that accepts configuration text. The configuration guide uses this renderer with explicit execution and completion signals.
Guides#
Pages that discuss to_config/1.