feat: add --generate-completion for shell tab completion

- Add clap_complete dependency for bash/zsh/fish/elvish/powershell
- Add --generate-completion <shell> flag that prints completion script to stdout
- profile.bash sources completions via command keep --generate-completion bash
- @ and @@ aliases get completions via wrapper functions that delegate to _keep
- README updated with Shell Completion section
This commit is contained in:
2026-03-14 11:02:38 -03:00
parent 158bf50864
commit 1a8ed56b68
6 changed files with 58 additions and 0 deletions

10
Cargo.lock generated
View File

@@ -435,6 +435,15 @@ dependencies = [
"strsim",
]
[[package]]
name = "clap_complete"
version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19c9f1dde76b736e3681f28cec9d5a61299cbaae0fce80a68e43724ad56031eb"
dependencies = [
"clap",
]
[[package]]
name = "clap_derive"
version = "4.6.0"
@@ -1649,6 +1658,7 @@ dependencies = [
"base64",
"chrono",
"clap",
"clap_complete",
"comfy-table",
"config",
"ctor",