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

search_panes

TypeScript

Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. Find which panes are showing something. Searches pane contents, not their names — use list_panes for metadata. Returns the matching lines with their pane, so you can target one without capturing them all. Literal matching stops at one 256 KiB aggregate UTF-8 byte budget.

All TypeScript tools · JSON · Source

Arguments

maxMatchesPerPane optional · integer
Stop after this many matches in each pane. Defaults to the server limit.
pattern required · string
Non-empty literal text to find.
regex optional · boolean
Interpret pattern using libtmux's bounded regular-expression grammar.
scrollbackLines optional · integer
How far above the visible screen to search. Default 0.
session optional · string
Restrict to one session by id or name.

Schemas

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

Input schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"maxMatchesPerPane": {
"description": "Stop after this many matches in each pane. Defaults to the server limit.",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"type": "integer"
},
"pattern": {
"description": "Non-empty literal text to find.",
"minLength": 1,
"type": "string"
},
"regex": {
"description": "Interpret pattern using libtmux's bounded regular-expression grammar.",
"type": "boolean"
},
"scrollbackLines": {
"description": "How far above the visible screen to search. Default 0.",
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"session": {
"description": "Restrict to one session by id or name.",
"type": "string"
}
},
"required": [
"pattern"
],
"type": "object"
}
Output schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"capturesByteClamped": {
"type": "boolean"
},
"effectiveScrollbackLines": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"matches": {
"items": {
"additionalProperties": false,
"properties": {
"lineNumber": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"paneId": {
"description": "Stable pane id, e.g. %1.",
"pattern": "^%\\d+$",
"type": "string"
},
"placements": {
"items": {
"additionalProperties": false,
"properties": {
"index": {
"description": "The window index in this session.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"sessionId": {
"description": "Stable session id, e.g. $1.",
"pattern": "^\\$\\d+$",
"type": "string"
},
"sessionName": {
"type": "string"
}
},
"required": [
"index",
"sessionId",
"sessionName"
],
"type": "object"
},
"type": "array"
},
"text": {
"type": "string"
},
"windowName": {
"type": "string"
}
},
"required": [
"lineNumber",
"paneId",
"placements",
"text",
"windowName"
],
"type": "object"
},
"type": "array"
},
"matchesTruncated": {
"type": "boolean"
},
"matchingByteClamped": {
"type": "boolean"
},
"matchingLineClamped": {
"type": "boolean"
},
"matchingTimeClamped": {
"type": "boolean"
},
"paneLimitClamped": {
"type": "boolean"
},
"panesFailed": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"panesSearched": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"scrollbackClamped": {
"type": "boolean"
}
},
"required": [
"capturesByteClamped",
"effectiveScrollbackLines",
"matches",
"matchingByteClamped",
"matchingLineClamped",
"matchingTimeClamped",
"matchesTruncated",
"paneLimitClamped",
"panesFailed",
"panesSearched",
"scrollbackClamped"
],
"type": "object"
}
Tool annotations
{
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true,
"readOnlyHint": false
}
Esc

Type to search.