You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: adapt interactive allowed commands to use regex patterns
- Update interactive 'a' option to generate regex patterns instead of glob patterns
- Fix pattern generation for option 1: use regex::escape() for exact commands
- Fix pattern generation for option 2: use 'command\s.*' to match 'command ' + anything (but not command alone)
- Remove glob-based pattern matching code that conflicted with main branch's regex approach
- Update unit tests to reflect regex pattern behavior
- Fix bug where commands like 'git log -1' weren't matching the allowed pattern
Key changes:
- Option 1 now generates: 'touch\ test\.txt' (escaped exact match)
- Option 2 now generates: 'git\s.*' (matches 'git ' + anything, not 'git' alone)
- Maintains compatibility with main branch's regex-based allowedCommands system
- All tests passing with proper regex pattern validation
Fixes issue where interactive menu generated incompatible glob patterns
instead of the expected regex patterns used by the main branch.
0 commit comments