feat: add hook uninstall and alias init#56
Open
pixincreate wants to merge 6 commits intomasterfrom
Open
Conversation
3a20e30 to
83276a0
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends KeyWatch’s CLI to support uninstalling git hooks (local and global via core.hooksPath) and introduces key-watch --init <shell> to provide keywatch/kw aliases without shipping extra binaries, alongside updated distribution docs/changelog.
Changes:
- Added
--uninstall-hookand--globalsupport for managing hooks in repo-local.git/hooksor Git’s global hooks directory. - Added
--init bash|zsh|fish|posixto print shell alias initialization forkeywatchandkw. - Removed duplicate wrapper binaries and the install script; updated README + changelog to reflect the new install/uninstall flows.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/lib.rs |
Implements global/local hook install target resolution, hook uninstall, and shell init output; adds unit tests for hooks-path resolution/safety. |
src/cli.rs |
Extends CLI options and argument grouping for --uninstall-hook, --global, and --init. |
tests/hooks_tests.rs |
Updates option construction and adds clap parsing tests for --global/--init interactions. |
tests/scanner_tests.rs |
Updates option construction to include new CLI fields. |
README.md |
Updates installation/uninstallation docs; documents global hooks and alias init flow. |
CHANGELOG.md |
Records the new hook uninstall/global hooks/init changes; notes removal of wrapper binaries/install script. |
Cargo.toml |
Removes explicit [[bin]] entries for wrapper binaries (relying on default src/main.rs). |
src/bin/watch.rs |
Removed wrapper binary. |
src/bin/keywatch.rs |
Removed wrapper binary. |
scripts/install.sh |
Removed install/uninstall script in favor of documented flows. |
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.
Summary
key-watch --init <shell>forkeywatchandkwaliases without shipping duplicate binariesVerification