Man pages by thomas-zahner · Pull Request #1858 · lycheeverse/lychee (original) (raw)
Man page generation now works. This closes #1789 and closes #1505. I've added a --generate flag to generate the man page. This makes the generation nicely contained in lychee itself. This is exactly how ripgrep does it and that's where I got the idea from. We can use --generate for shell completions as well, see #1564
You can inspect the man pages as follows: cargo run - --generate man | man -l - where of course lychee will be used in place of cargo run once it is released. Generation is also done as part of the pipeline, where I now also include documentation as part of the release, again inspired by ripgrep. Until now we only shipped the binary with releases no documentation at all. I haven't yet tested the pipeline on GitHub as I couldn't run it on my branch.
One thing to note is that the man page does not yet list OPTIONS in alphabetical order. This is asymmetrical to --help which is why I've worked on clap-rs/clap#6142. But this issue is independent of this PR. Once it is fixed in clap_mangen we just need await a release and bump the dependencies to get that to work.
@mre what do you think?