pub fn hook<F>(
config: &Config,
shell: Shell,
line: &str,
cursor: usize,
command_exists: F,
) -> HookActionExpand description
Core hook entry point, shell-agnostic.
line is the shell’s current buffer, cursor is the byte offset of the
caret. If a known abbreviation ends at the cursor and the prefix is a
command position, expand it; otherwise fall back to inserting a space.