A wrapper script to use CotEditor as the external editor (Ctrl+G) in Claude Code on macOS.
- The
cot --waitcommand has a bug on macOS Tahoe + Ghostty that causes exit code 1 open --wait-appswaits for the app to quit (⌘Q), not the document to close (⌘W)- This script uses AppleScript to detect when the document is closed, and returns focus to the terminal immediately after