Skip to main content Module rewrite_registry Copy item path Source RewriteEntry Category REWRITE_COMMANDS Single source of truth for all commands that lean-ctx rewrites/compresses.
Used by: hook_handlers (PreToolUse), hooks.rs (bash scripts), cli.rs (shell aliases). bash_case_pattern Generates a bash case pattern for rewrite scripts.
e.g. git\ *|gh\ *|cargo\ *|npm\ *|... hook_bare_commands Commands eligible for PreToolUse hook (bare command match, no trailing space).
Used for commands like eslint, prettier, tsc that may run without args. hook_prefixes Commands eligible for PreToolUse hook rewriting (IDE hooks).
Excludes rg (search tools should use native Read/Grep in IDEs). is_rewritable_command Check if a command string matches a rewritable prefix (for hook handlers). shell_alias_commands All command names for shell alias generation. shell_alias_list Space-separated list for shell alias arrays.