Evaluate tmux format string (display_message)¶
display_message¶
display_messageEvaluate a tmux format string against a target and return the expanded value.
- Returns:
Use when you need to query arbitrary tmux variables — zoom state, pane
dead flag, client activity, or any #{format} string that isn’t covered by
other tools. Despite the historical name (display_message is the tmux verb
it wraps), this tool does not display anything to the user; it expands
the format string with display-message -p and returns the value.
Avoid when a dedicated tool already provides the information — e.g. use
snapshot_pane for cursor position and mode, or
get_pane_info for standard metadata.
Side effects: None. Readonly.
Example:
{
"tool": "display_message",
"arguments": {
"format_string": "zoomed=#{window_zoomed_flag} dead=#{pane_dead}",
"pane_id": "%0"
}
}
Response (string):
zoomed=0 dead=0
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
yes |
— |
tmux format string (e.g. ‘#{cursor_x} #{cursor_y}’). |
|
|
no |
— |
Pane ID (e.g. ‘%1’). |
|
|
no |
— |
Session name for pane resolution. |
|
|
no |
— |
Session ID for pane resolution. |
|
|
no |
— |
Window ID for pane resolution. |
|
|
no |
— |
tmux socket name. |