tmux_if_shell
Conditionally execute tmux commands by running a shell command or tmux format, then running a specified command if true and optionally another if false.
Instructions
Run a tmux command conditionally with if-shell.
Runs condition as a shell command; if it succeeds, runs the tmux
command if_command, otherwise else_command (if given). is_format=True
(-F) treats condition as a tmux format that is true unless it evaluates
to empty or "0" (no shell). background=True (-b) runs in the background.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"condition": "<condition>",
"if_command": "<if_command>"
},
"name": "tmux_if_shell"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| condition | Yes | ||
| if_command | Yes | ||
| else_command | No | ||
| background | No | ||
| is_format | No | ||
| target | No |