`argh-complete` approach could be simplified (like in `clap`)
Open
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
In `clap`, you can do like this:
```rust
use clap_complete::{generate, Shell};
let mut cmd = MyArgs::command(); // a simple way to get a command name
let shell: Shell = args.shell.into(); // a custom `--shell` arg into `Shell`
generate(shell, &mut cmd, "adi", &mut io::stdout()); // boom!
```
You [completion_example.rs](https://github.com/google/argh/blob/master/argh/examples/completion_example.rs) looks more complex, but **it's only one step away.**
1. Add `MyArgs::command()`.
2. Add `Shell` type.
3. Add auto-dispatch `argh_complete::generate()`.
Contributor guide
Assessment
This issue has not been assessed yet.