clap_mangen already has a signature similar to clap_complete::generator::generate, and if we write our own implementation for clap_complete::generator::generate_to, we can add Man/ManPage to Shells without any changes needed for users.
An advantage to adding this to the library is that it provides a nicer interface for end users, and avoids needing something like a completions and a manpage command. A workaround could be adding a flag to the completions command, which feels awkward as it's mutually exclusive with providing a shell, and also feels like it's meant to be an argument.
We should probably add this as a feature flag as some library users may already generate man pages themselves or aren't interested in providing man pages, and man pages are slightly different to providing shell completions.
If we make a breaking change bump, we could make it a default feature flag, as users are more likely to see the addition and opt out, but as clap_mangen is <1.0, we can delay this for a future release, which will also give us information on how many people want man page generation.
clap_mangenalready has a signature similar toclap_complete::generator::generate, and if we write our own implementation forclap_complete::generator::generate_to, we can addMan/ManPagetoShellswithout any changes needed for users.An advantage to adding this to the library is that it provides a nicer interface for end users, and avoids needing something like a
completionsand amanpagecommand. A workaround could be adding a flag to thecompletionscommand, which feels awkward as it's mutually exclusive with providing a shell, and also feels like it's meant to be an argument.We should probably add this as a feature flag as some library users may already generate man pages themselves or aren't interested in providing man pages, and man pages are slightly different to providing shell completions.
If we make a breaking change bump, we could make it a default feature flag, as users are more likely to see the addition and opt out, but as
clap_mangenis <1.0, we can delay this for a future release, which will also give us information on how many people want man page generation.