Skip to main content

Module cli

Module cli 

Source
Expand description

Clap subcommand integration and shell completion installation helpers.

This module exposes reusable commands for generating config templates, printing shell completions, and installing or uninstalling completions in common shell startup locations.

Enums§

ConfigCommand
Built-in clap subcommands for config templates and shell completions.

Functions§

handle_config_command
Handles a built-in config subcommand for a consumer CLI.
install_shell_completion
Generates shell completion files and updates shell startup files when needed.
print_shell_completion
Writes shell completion output to stdout.
uninstall_shell_completion
Removes shell completion files and managed shell startup-file blocks.
upsert_managed_block
Inserts or replaces a managed shell configuration block in a startup file.