it2 shell
Shell state detection and prompt tracking
Description
Commands for detecting shell state and waiting for prompts.
These commands enable reliable automation timing by allowing scripts to detect
when the shell is ready for input and wait for command completion.
Features:
- Detect shell state (ready, busy, tui, unknown)
- Wait for shell prompt before sending commands
- Solve race conditions in terminal automation
- Support both Shell Integration and fallback detection
Requires Shell Integration for best results, but provides fallback detection
using session variables when Shell Integration is unavailable.
Commands
- it2 shell state - Check if shell is ready for input
- it2 shell wait-for-prompt - Wait until shell prompt appears
Options inherited from parent commands
-
--format(default "text") - Output format (text, json, yaml) - affects how command results are displayed
-
--timeout - Timeout for API operations - how long to wait for iTerm2 to respond
-
--url - WebSocket URL for iTerm2 API - typically ws://localhost:1912 for local iTerm2
See Also
- it2 - iTerm2 API Command-Line Interface