Skip to main content

register_shell_commands

Function register_shell_commands 

Source
pub fn register_shell_commands(cli: Command, prog_name: &str) -> Command
Expand description

Attach the completion and man subcommands to the given root command and return it. Uses the clap v4 builder idiom (consume + return).

  • completion <shell> — emit shell completion script to stdout Supported shells: bash, zsh, fish, powershell, elvish
  • man — emit a man page to stdout