Skip to main content

refresh_installed_shell_hooks

Function refresh_installed_shell_hooks 

Source
pub fn refresh_installed_shell_hooks()
Expand description

Bring already-installed shell hooks up to this binary (#1959).

Only init, setup, update and doctor --fix write the hook files, so a package-manager upgrade (FreeBSD ports, AUR, Homebrew, cargo install) kept the hook an older build wrote — with aliases calling _lc, which agent shells that drop _-prefixed functions fail on (#1898). Called on MCP server start, next to the agent-hook refresh. Rewrites only hook files that exist and are stale, never an rc file, and does nothing when the shell hook is disabled.