Skip to content

Automatic manapge generation with vg help --man - #5018

Open
faithokamoto wants to merge 5 commits into
masterfrom
subcmd-manpage
Open

Automatic manapge generation with vg help --man#5018
faithokamoto wants to merge 5 commits into
masterfrom
subcmd-manpage

Conversation

@faithokamoto

Copy link
Copy Markdown
Contributor

Changelog Entry

To be copied to the draft changelog by merger:

  • vg help --man will output a fully formed Markdown manpage
  • vg help subcommand will output the same thing as running vg subcommand, i.e. the default helptext

Description

BEHOLD MY WORKS. Ahem. Extension of #4979 but now the Better (TM) manpage is generated by vg help --man instead of a separate script. I've diffed it against the current manpage and what changed were:

  • A few subcommand blurbs were edited to be better (e.g. vg giraffe's dropped the "short" from before "read alignment")
  • Things are correctly alphabetized
  • Deprecated subcommands still have their helptext printed, they're just not in the lists at the top.

Because vg help now needs to be able to print helptexts for other commands, I have Subcommands save a helptext function. Some subcommands' helptext functions require extra arguments. I worked around this by defining extra standard-argument functions, e.g. see help_augment_default().

The main thing I'm worried about here is vg giraffe. I did some terrible no good very bad hacks to make its default helptext function work because the previous one really wanted to be passed a list of presets. If you have a better way to do that I'm all ears.

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 this pull request may close these issues.

2 participants