Skip to content

console: generate man pages and shell completions #325

Open
@hawkw

Description

@hawkw

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-consoleCrate: console.S-featureSeverity: feature. This is adding a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions