Repository navigation
fix(hooks): cover the PowerShell tool and skip searches the index cannot answer (v2.1.3) - #35
Merged
Merged
Conversation
…not answer The guard only read Grep and Bash, so an index command run from PowerShell never turned it off and PowerShell searches went unseen. Add the tool to both matchers, skip here-string bodies, read Select-String's named parameters, and let install-hooks refresh an installed matcher. Searches over git internals, binaries and paths outside the repository now pass, as does everything in a directory without an index.
Version bump with every mirror synced (plugin.json, requirements.lock, skill stamps) and the 2.1.3 release notes.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
GrepandBash. Acodebase-indexcommand run from Claude Code's PowerShell tool never turned it off, soGrepkept being intercepted for the whole session, and PowerShell searches were not guarded at all.install-hooksskipped an installed guard, so a new matcher could not reach existing installs..gitinternals, binaries and paths outside the repository.Solution
PowerShellto the guard and to both matchers, skip here-string bodies, and readSelect-String's named-Pattern,-Pathand-LiteralPath.install-hooksrefreshes the matcher of an installed guard.Also bumps the version to 2.1.3 with every mirror synced.
Verification
New tests in
tests/test_hooks_guard.py, the PowerShell ones failing before the fix. A test ties both matchers to the tools the guard reads. Full suite passes (coverage 86%), ruff and mypy clean,check_versions.pyconsistent.Compatibility
Plugin users get the new matcher automatically. Users of
install-hooksrun it again after upgrading; until then their hook behaves as before for PowerShell.