tokio-rs / console

a debugger for async rust!
MIT License
3.57k stars 140 forks source link

console: generate man pages and shell completions #325

Open hawkw opened 2 years ago

hawkw commented 2 years ago

What problem are you trying to solve?

It would be nice if a man page for tokio-console could be generated and installed. Similarly, it would be nice to be able to generate command completion scripts for various shells.

How should the problem be solved?

The clap_mangen and clap_complete crates can be used to generate man pages and shell completions for a clap CLI, respectively. We can use these crates to generate man pages and completions for the console.

Any alternatives you've considered?

I'm not sure the best way to distribute man pages/completions. I've seen some people generating them in a CI job and committing them to the repo when the CLI changes. This could be fine if we expect the console to be distributed primarily by package managers. However, if we expect people to get it using cargo install, I don't believe there's a nice way for cargo install to install completions or man pages. Instead, we might want to consider having subcommands in the binary itself for generating completions/man pages, so that users can cargo install the console and then install the shell completions/man pages?

How would users interact with this feature?

No response

Would you like to work on this feature?

maybe

nrskt commented 2 years ago

I’d like to take it.