Format Variables in tmux

From the tmux cheat sheet ยท Formats and Automation ยท verified Aug 2026

Format Variables

Print tmux state for scripts and status content.

bash
tmux display-message -p '#S:#I.#P'
๐Ÿ“Œ -p prints the expanded result to stdout
๐Ÿ’ก -F formats every row from list commands
๐Ÿ” Long and short variable names can be mixed
๐ŸŽฏ Prefer formats over parsing human-readable output
formatsscriptingdisplay-message

Continue with tmux

Save the full cheat sheet or work through every related task.

More tmux tasks

Back to the full tmux cheat sheet