mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-20 05:02:20 +00:00
Replace inline command strings in settings.json with external scripts in .claude/hooks/ for readability and maintainability. Consolidate three PostToolUse formatters into one script and add markdown/yaml formatting. Add new hooks: SessionStart context banner, Stop lint gate, async Bats test runner, idle desktop notification, and PostToolUseFailure logger.
16 lines
423 B
Bash
Executable File
16 lines
423 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# SessionStart context: print branch, dirty file count, and last commit.
|
|
|
|
cd "$CLAUDE_PROJECT_DIR" || exit 0
|
|
|
|
branch=$(git branch --show-current 2> /dev/null)
|
|
dirty=$(git status --short 2> /dev/null | wc -l | tr -d ' ')
|
|
last=$(git log -1 --oneline 2> /dev/null)
|
|
|
|
echo "=== Dotfiles session context ==="
|
|
echo "Branch : ${branch:-unknown}"
|
|
echo "Dirty : ${dirty} file(s)"
|
|
echo "Last : ${last}"
|
|
|
|
exit 0
|