Problem
Thoth wires shell hooks via tth init, but there is no way to generate shell completion scripts. Users typing tth <TAB> get nothing, so subcommands, flags, and values (like theme names) are not discoverable from the shell.
Proposed solution
Add a tth completions <shell> command that prints a completion script to stdout, for bash, zsh, and fish. It should reuse the existing clap command definition so completions stay in sync automatically.
tth completions zsh > ~/.zfunc/_tth
Alternatives considered
- Hand-written completion scripts - discarded: drift out of sync with the CLI on every flag change.
- Bundling static scripts in the repo - discarded: same drift problem; generation from clap is the idiomatic Rust approach.
Acceptance criteria
Scope
cli (new subcommand), Cargo.toml (clap_complete dependency), docs.
Additional context
clap_complete::generate is the standard tool. The CLI is defined with clap in src/cli.rs; expose the Command so both parsing and completion generation use it. Good first issue: mechanical and self-contained, no business logic.
Problem
Thoth wires shell hooks via
tth init, but there is no way to generate shell completion scripts. Users typingtth <TAB>get nothing, so subcommands, flags, and values (like theme names) are not discoverable from the shell.Proposed solution
Add a
tth completions <shell>command that prints a completion script to stdout, forbash,zsh, andfish. It should reuse the existing clap command definition so completions stay in sync automatically.Alternatives considered
Acceptance criteria
tth completions <shell>prints a valid script for bash, zsh, and fish.Scope
cli(new subcommand),Cargo.toml(clap_completedependency), docs.Additional context
clap_complete::generateis the standard tool. The CLI is defined with clap insrc/cli.rs; expose theCommandso both parsing and completion generation use it. Good first issue: mechanical and self-contained, no business logic.