Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add man page support #10

Open
nihaals opened this issue Nov 2, 2022 · 0 comments · May be fixed by #11
Open

Add man page support #10

nihaals opened this issue Nov 2, 2022 · 0 comments · May be fixed by #11

Comments

@nihaals
Copy link
Owner

nihaals commented Nov 2, 2022

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.

@nihaals nihaals linked a pull request Nov 23, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant