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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| condition | Yes | ||
| if_command | Yes | ||
| else_command | No | ||
| background | No | ||
| is_format | No | ||
| target | No |