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
| #!/usr/bin/env bash | |
| # Auto-approve piped/chained bash commands when all components match allowed patterns | |
| # This fixes the Claude Code bug where piped commands prompt even when individual commands are allowed | |
| set -euo pipefail | |
| # Read input from stdin (Claude passes CLAUDE_TOOL_INPUT as JSON) | |
| INPUT=$(cat) | |
| # Extract the command from the JSON input |