mango icon indicating copy to clipboard operation
mango copied to clipboard

Cobra's built-in Man Doc generation

Open meyermarcel opened this issue 3 years ago • 1 comments

What is the advantage of this package compared to Cobra's built-in well tested Man Doc generation?

See https://github.com/spf13/cobra/blob/2a5277810f24ae1b8a200198be8dd855a9041a0e/doc/man_docs.go

meyermarcel avatar Jan 13 '22 23:01 meyermarcel

Cobra generates a series of man pages, one for each sub-command. While that is fine for big command-sets (think git), for the average cli tool this is absolute overkill, the opposite of user-friendly, and gets a big fat "nope" from package maintainers. I actually tried to improve this situation in Cobra first, but their man-page generation is a bit awkward: it generates markdown, which then gets converted to the roff format. This is another thing I wanted to avoid, because it doesn't exactly lead to beautiful man pages (if there's such a thing, heh).

muesli avatar Jan 14 '22 05:01 muesli