[Feature Request] Support OR syntax in hooks[].if field like matcher
Status Closed — not planned
Reported on v2.1.112
Maintainer reply None cached
Activity 2 comments · opened Apr 17, 2026 · closed May 24, 2026
Bug Description
---
Title: hooks[].if field should support OR syntax like matcher
Body:
▎ The matcher field supports OR syntax (e.g., "Write|Edit"), but the if field only accepts a single permission rule pattern.
▎
▎ When you need to run the same hook for multiple conditions (e.g., Bash(git ) OR Bash(npm )), you're forced to duplicate the entire hook entry — one per condition.
▎
▎ Request: Support OR syntax in if, e.g.:
▎ "if": "Bash(git )|Bash(npm )"
---
Environment Info
- Platform: win32
- Terminal: null
- Version: 2.1.112
- Feedback ID: 818b87c8-bd08-4da9-80e0-0cb38a418606
Errors
[]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗