mirror of
https://github.com/automazeio/ccpm.git
synced 2025-10-09 13:41:06 +03:00
- Fix critical bugs in worktree detection and command parsing: * Distinguish between git worktrees and submodules (check for /worktrees/ in gitdir path) * Fix TAB pattern bug using proper tokenization instead of brittle globbing * Fix overly broad dot-prefix skip that broke ./script.sh execution * Add proper path quoting to handle spaces and special characters * Capture all arguments with $* instead of just $1 - Improve documentation: * Remove personal paths from examples * Restructure troubleshooting steps for clarity * Switch from jq to python -m json.tool for wider compatibility * Clarify that hook config goes in main .claude/settings.json - Simplify configuration: * Remove redundant config.json * Add settings.json.example showing proper integration * Fix background process detection for both "cmd &" and "cmd&" patterns These changes prevent false positives on commands like "cdbuild", ensure relative scripts work in worktrees, and handle paths with spaces correctly.
12 lines
287 B
JSON
12 lines
287 B
JSON
{
|
|
"hooks": {
|
|
"pre-tool-use": {
|
|
"Bash": {
|
|
"enabled": true,
|
|
"script": ".claude/hooks/bash-worktree-fix.sh",
|
|
"description": "Automatically prepends worktree path to Bash commands when in a worktree",
|
|
"apply_to_subagents": true
|
|
}
|
|
}
|
|
}
|
|
} |