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

wait_for_text

Waits for new pane output without accepting executable input. Discounts recognized input from this server while pending and for ten seconds after submission. Output identical to that input and partially redrawn echoes are ambiguous; use run_shell_command for commands you start. Wait for the prompt before typing into a cold shell. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.

All Java tools · JSON · Source

Arguments

cursor optional · string
A cursor returned by an earlier capture.
max_lines optional · integer
Maximum observed lines to return. Defaults to 200.

Default: 200.

pane_id required · string
The pane to act on, such as %1. Every listing tool returns these.
patterns optional · array | string
Text to wait for; any one ends the wait. One value may be sent on its own, without a list.
regex optional · boolean
Treat patterns and stops as regular expressions. Defaults to false.

Default: false.

stop optional · array | string
Failure text; any one ends the wait. One value may be sent on its own, without a list.
timeout optional · number
Seconds to wait before giving up. Defaults to 30.0.

Default: 30.

Schemas

The schema defines required fields, nested values, defaults, and validation constraints.

Input schema
{
"additionalProperties": false,
"properties": {
"cursor": {
"description": "A cursor returned by an earlier capture.",
"type": "string"
},
"max_lines": {
"default": 200,
"description": "Maximum observed lines to return. Defaults to 200.",
"type": "integer"
},
"pane_id": {
"description": "The pane to act on, such as %1. Every listing tool returns these.",
"type": "string"
},
"patterns": {
"description": "Text to wait for; any one ends the wait. One value may be sent on its own, without a list.",
"items": {
"maxLength": 4096,
"type": "string"
},
"maxItems": 32,
"type": [
"array",
"string"
]
},
"regex": {
"default": false,
"description": "Treat patterns and stops as regular expressions. Defaults to false.",
"type": "boolean"
},
"stop": {
"description": "Failure text; any one ends the wait. One value may be sent on its own, without a list.",
"items": {
"maxLength": 4096,
"type": "string"
},
"maxItems": 32,
"type": [
"array",
"string"
]
},
"timeout": {
"default": 30,
"description": "Seconds to wait before giving up. Defaults to 30.0.",
"type": "number"
}
},
"required": [
"pane_id"
],
"type": "object"
}
Output schema
{
"additionalProperties": false,
"properties": {
"cursor": {
"type": "string"
},
"effective_timeout": {
"type": "number"
},
"lines_dropped": {
"type": "integer"
},
"matched": {
"type": "string"
},
"matched_line": {
"type": "string"
},
"note": {
"type": "string"
},
"outcome": {
"type": "string"
},
"output": {
"items": {
"type": "string"
},
"type": "array"
},
"pane_id": {
"type": "string"
},
"seconds": {
"type": "number"
},
"truncated": {
"type": "boolean"
}
},
"required": [
"pane_id",
"outcome",
"output",
"truncated",
"lines_dropped",
"cursor",
"seconds",
"effective_timeout"
],
"type": "object"
}
Tool annotations
{
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true,
"readOnlyHint": false,
"title": "Wait for pane text"
}
Esc

Type to search.