diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-22 17:38:56 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-22 17:38:56 -0500 |
| commit | 95f57618b1e55b910d143fa6d188323a1cc4484f (patch) | |
| tree | 84cebbba456466ad8c0453f3964481ba813d32f5 /Makefile | |
| parent | ca6a213841129a72881f17d7050dff3b48c637ac (diff) | |
| download | rulesets-95f57618b1e55b910d143fa6d188323a1cc4484f.tar.gz rulesets-95f57618b1e55b910d143fa6d188323a1cc4484f.zip | |
feat(make): add an interactive remove target with fzf
make remove is the granular counterpart to make uninstall, which removes everything. remove.sh lists every rulesets-managed symlink under ~/.claude/ — only links whose target resolves into the repo, so foreign symlinks are left alone — pipes them through fzf --multi, and rm's the picked links. The repo's own files stay put, and make install re-creates anything removed.
It's split into --list and --remove-selected modes so the logic is testable without fzf. 5 bats cases cover the listing, the foreign-link exclusion, removal, report-and-continue on a missing target, and the empty no-op. The removal loop runs without set -e and without rm -f, so a vanished target reports visibly and the rest still process. shellcheck clean, make test green.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -75,7 +75,7 @@ $(if $(shell command -v pacman 2>/dev/null),sudo pacman -S --noconfirm $(1),\ $(error No supported package manager found (brew/apt-get/pacman))))) endef -.PHONY: help install uninstall list install-hooks uninstall-hooks \ +.PHONY: help install uninstall remove list install-hooks uninstall-hooks \ install-lang install-elisp install-python list-languages \ install-mcp diff lint doctor test deps @@ -290,6 +290,9 @@ uninstall: ## Remove global symlinks from ~/.claude/ @echo "" @echo "done" +remove: ## Interactively pick installed rulesets entries to remove (fzf) + @bash scripts/remove.sh + list: ## Show global install status @echo "Skills:" @for skill in $(SKILLS); do \ |
