feat(claude): block edits to submodule paths in pre-edit hook

This commit is contained in:
2026-03-20 21:54:39 +02:00
parent 72934232d9
commit 73ef292bd9

View File

@@ -10,6 +10,18 @@ case "$fp" in
echo "BLOCKED: $fp is a vendor/lock file — do not edit directly" >&2 echo "BLOCKED: $fp is a vendor/lock file — do not edit directly" >&2
exit 2 exit 2
;; ;;
*/tools/dotbot/* | */tools/dotbot-include/* | */tools/antidote/*)
echo "BLOCKED: $fp is inside a git submodule — do not edit" >&2
exit 2
;;
*/config/tmux/plugins/*)
echo "BLOCKED: $fp is a tmux plugin submodule — do not edit" >&2
exit 2
;;
*/config/cheat/cheatsheets/community/* | */config/cheat/cheatsheets/tldr/*)
echo "BLOCKED: $fp is a cheat submodule — do not edit" >&2
exit 2
;;
*/secrets.d/*.fish) */secrets.d/*.fish)
case "$(basename "$fp")" in case "$(basename "$fp")" in
*.example.fish | *.fish.example) exit 0 ;; *.example.fish | *.fish.example) exit 0 ;;