This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Run claude and capture both the message and session ID | |
| all_args="$@" | |
| OUTPUT=$(claude -p "$all_args" --output-format json) | |
| # Extract the commit message and session ID | |
| # Claude outputs different schemas depending on whether "vebose" output is on. | |
| # Try basic format (simple dict) first, fall back to "verbose" format (array of dicts with type=="result") | |
| RESULT=$(echo "$OUTPUT" | jq -r '.result // empty' 2>/dev/null) |