Bug Fix: Shell Hook Idempotent Updates
Fixes a critical UX issue where lean-ctx init --global refused to update existing shell aliases, leaving users stuck with broken aliases from older versions.
Fixed
init --globalnow auto-replaces old aliases — detects and removes old lean-ctx block, then writes fresh aliases with correct absolute binary path- No manual cleanup required — users no longer need to manually delete old alias blocks before re-running init
- PowerShell profile update — auto-replaces old function blocks too
Added
remove_lean_ctx_block()for POSIX/fish config cleanupremove_lean_ctx_block_ps()for PowerShell profile cleanup (brace-depth aware)- 4 unit tests for block removal
Upgrade
cargo install lean-ctx --force
# or download from releases below
lean-ctx init --global # auto-replaces old aliases!
lean-ctx init --agent claude # regenerate hook scriptsNo manual .bashrc editing needed anymore.
Full Changelog: v2.1.2...v2.1.3