hivectl: shell completions verb + ship zsh/bash/fish completions (#1764)
Add a 'hivectl completions <shell>' subcommand (clap_complete) that prints a completion script for bash/zsh/fish/elvish/powershell, generated from hivectl's own clap command tree so it never drifts from the real verbs/flags. The package build installs the bash/zsh/fish scripts via installShellFiles, so an operator gets working completion automatically once hivectl is on their profile with shell completion enabled. Regenerated docs/tools/hivectl-cli.md for the new verb.
This commit is contained in:
parent
f5003fd1bb
commit
c7612dcf2b
6 changed files with 73 additions and 1 deletions
10
Cargo.lock
generated
10
Cargo.lock
generated
|
|
@ -539,6 +539,15 @@ dependencies = [
|
|||
"strsim",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_complete"
|
||||
version = "4.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0a7a9bfdb35811f9e59832f0f05975114d2251b415fb534108e6f34060fd772"
|
||||
dependencies = [
|
||||
"clap",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_derive"
|
||||
version = "4.6.1"
|
||||
|
|
@ -1354,6 +1363,7 @@ dependencies = [
|
|||
"bcrypt",
|
||||
"clap",
|
||||
"clap-markdown",
|
||||
"clap_complete",
|
||||
"hive-sh4re",
|
||||
"libc",
|
||||
"listenfd",
|
||||
|
|
|
|||
Loading…
Reference in a new issue