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

Search what panes are displaying with Rust’s linear-time regex engine. Accept at most 4,096 pattern bytes; search at most 64 panes, 8,192 lines, and 1 MiB; spend at most 250 ms matching and five seconds capturing. Report the pane and line of every match. Use this to find where something is — which pane has the failing test, which one printed the error — instead of capturing panes one at a time. Searches the visible screen by default; set history to include scrollback. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.

All Rust tools · JSON · Source

Arguments

history optional · boolean
Search scrollback as well as the visible screen.

Default: false.

match_case optional · boolean
Match case. Off by default.

Default: false.

pattern required · string
The text to look for.
regex optional · boolean
Read the pattern as a regular expression rather than literal text.

Default: false.

session optional · string | null
Only search panes in this session, by `$`-prefixed id or name. Omit for every session.
window optional · string | null
Only search panes in this window, by `@`-prefixed id. Omit for every window.

Schemas

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

Input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"history": {
"default": false,
"description": "Search scrollback as well as the visible screen.",
"type": "boolean"
},
"match_case": {
"default": false,
"description": "Match case. Off by default.",
"type": "boolean"
},
"pattern": {
"description": "The text to look for.",
"maxLength": 4096,
"type": "string"
},
"regex": {
"default": false,
"description": "Read the pattern as a regular expression rather than literal text.",
"type": "boolean"
},
"session": {
"description": "Only search panes in this session, by `$`-prefixed id or name. Omit\nfor every session.",
"type": [
"string",
"null"
]
},
"window": {
"description": "Only search panes in this window, by `@`-prefixed id. Omit for every\nwindow.",
"type": [
"string",
"null"
]
}
},
"required": [
"pattern"
],
"type": "object"
}
Output schema
{
"$defs": {
"MatchView": {
"description": "One line of one pane that matched a search.",
"properties": {
"line": {
"description": "Which line of the capture matched, counting from the top.",
"minimum": 0,
"type": "integer"
},
"pane": {
"description": "The pane the line was found in.",
"type": "string"
},
"text": {
"description": "The line itself.",
"type": "string"
},
"window_id": {
"description": "The window that pane belongs to.",
"type": "string"
}
},
"required": [
"pane",
"window_id",
"line",
"text"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"capped": {
"description": "Whether the match ceiling was reached, so there may be more.",
"type": "boolean"
},
"matches": {
"description": "Every matching line, in the order the panes were read.",
"items": {
"$ref": "#/$defs/MatchView"
},
"type": "array"
},
"panes_searched": {
"description": "How many panes were read to answer this.",
"minimum": 0,
"type": "integer"
}
},
"required": [
"matches",
"panes_searched",
"capped"
],
"type": "object"
}
Tool annotations
{
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true,
"readOnlyHint": true,
"title": "Search Pane Contents"
}
Esc

Type to search.