On this page
Server.format(_:for:)
- Declared in
- Server
- Package
- libtmux-swift
- Source
- Sources/LibTmux/Formats.swift
-
Evaluates a tmux format and hands back what it printed.
The listed types carry the fields worth modelling — a
Paneknows its id, its size, and what is running in it. tmux publishes hundreds more, and this reaches any of them without the library having to name each one first:Ask for as many fields as you like in one template, separated by whatever the value cannot contain — a newline is the one separator to avoid, since a connection reads commands by line and refuses one.
> Warning: tmux runs
#(command)in a template and substitutes its > output, so a template is executable. Write it, or double the#in > anything that reaches one from elsewhere.- Returns: what tmux printed, minus the newline it ends every answer with, or
nilwhentargetno longer resolves.
- Raises
- Returns: what tmux printed, minus the newline it ends every answer with, or
0 declared, 0 inherited