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

run_shell_command

Run a shell command in a pane with your user’s permissions. Runs one command you author in a pane that is not synchronized with others, rechecks the pane just before sending, and waits for it to finish, reporting its exit status.

All Go tools · JSON · Source

Arguments

command required · string
the shell command run in the pane's interactive shell
max_lines optional · integer
maximum output lines, keeping the newest
pane_id required · string
the pane id, such as %1
suppress_history optional · boolean
best-effort persistent history suppression
timeout optional · number
seconds to wait before giving up

Schemas

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

Input schema
{
"additionalProperties": false,
"properties": {
"command": {
"description": "the shell command run in the pane's interactive shell",
"type": "string"
},
"max_lines": {
"description": "maximum output lines, keeping the newest",
"minimum": 0,
"type": "integer"
},
"pane_id": {
"description": "the pane id, such as %1",
"type": "string"
},
"suppress_history": {
"description": "best-effort persistent history suppression",
"type": "boolean"
},
"timeout": {
"description": "seconds to wait before giving up",
"minimum": 0,
"type": "number"
}
},
"required": [
"pane_id",
"command"
],
"type": "object"
}
Output schema
{
"additionalProperties": false,
"properties": {
"effective_timeout_seconds": {
"type": "integer"
},
"exit_status": {
"type": [
"null",
"integer"
]
},
"lines_missed": {
"type": "boolean"
},
"output": {
"items": {
"type": "string"
},
"type": [
"array"
]
},
"output_unavailable": {
"type": "string"
},
"pane_id": {
"type": "string"
},
"resolved_pane_ids": {
"items": {
"type": "string"
},
"type": [
"array"
]
},
"running": {
"type": "string"
},
"timed_out": {
"type": "boolean"
},
"timeout_clamped": {
"type": "boolean"
}
},
"required": [
"pane_id",
"resolved_pane_ids",
"timed_out",
"output"
],
"type": "object"
}
Tool annotations
{
"destructiveHint": true,
"openWorldHint": true,
"title": "Run a shell command"
}
Esc

Type to search.