Skip to main content

complete_init

Function complete_init 

Source
pub fn complete_init(shell: &str, usage_bin: &str) -> Result<String, UsageErr>
Expand description

Generates a shell-specific “init” script that enables tab-completion for any command on $PATH whose first line is a usage shebang, without requiring per-script usage g completion generation. The user sources this once from their shell rc.

§Supported Shells

  • bash - registers a complete -D default handler
  • zsh - registers a compdef -default- fallback handler
  • fish - scans $PATH once at startup and registers per-command completers