split hivectl main.rs into per-domain modules (#2509)

This commit is contained in:
damocles 2026-07-16 11:17:50 +02:00
commit fc7720572b
16 changed files with 1922 additions and 1771 deletions

View file

@ -0,0 +1,14 @@
//! `hivectl completions <shell>` — emit a shell completion script,
//! generated from the live clap command tree so it never drifts from the
//! actual verbs and flags.
use crate::cli::Cli;
/// Emit a shell completion script for `hivectl` to stdout. Walks the clap
/// command tree (the single source of truth — same tree `markdown-docs`
/// renders) so completions never drift from the actual verbs/flags.
pub(crate) fn generate_completions(shell: clap_complete::Shell) {
use clap::CommandFactory as _;
let mut cmd = Cli::command();
clap_complete::generate(shell, &mut cmd, "hivectl", &mut std::io::stdout());
}