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

Manpage generation #5

Closed
tertsdiepraam opened this issue Dec 15, 2022 · 1 comment · Fixed by #55
Closed

Manpage generation #5

tertsdiepraam opened this issue Dec 15, 2022 · 1 comment · Fixed by #55
Labels
enhancement New feature or request

Comments

@tertsdiepraam
Copy link
Member

Like clap we should be able to create manpages automatically.

@tertsdiepraam tertsdiepraam added the enhancement New feature or request label Dec 15, 2022
@tertsdiepraam
Copy link
Member Author

tertsdiepraam commented Feb 16, 2023

I'll expand a bit on this on why this is difficult in general. We can have the proc macro for Arguments do this automatically, but the information is non-local. For example, the accepted values come from the Value macro and are not encoded within the arguments enum. So we need to combine the output of multiple macros somehow. Here's my proposed solution:

  1. Each macro writes JSON to the target directory, so that we get a JSON file per type.
  2. We provide an additional library (and maybe even binary) that collects these files and builds manpages and shell completions out of that.
  3. In uutils, we use that library in uudoc.

This crate will be useful: https://github.com/rust-cli/man

Edit: Well, I just realized I wrote the same plan as in https://github.com/tertsdiepraam/uutils-args/issues/4. This solution will probably do both completions and manpages at the same time.

@tertsdiepraam tertsdiepraam linked a pull request Dec 9, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant