Commit graph

5 commits

Author SHA1 Message Date
Olivier Robardet
98e8c716ca
Add a COMMANDS section to generated man pages
When a command has available sub-commands, the COMMANDS
man section is generated with the list of sub-commands, with
their name, short description, and the name of the dedicated
man page.
2022-04-20 15:04:17 +02:00
Marc Lopez Rubio
02a0d2fbc9
doc: GenMarkdown skip Synopsis on empty long cmd (#1207)
This patch modifies the GenMarkdownCustom to skip writing a Synopsis
header with the `cmd.Short` duplicated both before and after the header.

Instead, it only writes the `### Synopsis` header and the paragraph when
a `cmd.Long` has some kind of content in it.

Adds `TestGenMdDocWithNoLongOrSynopsis` as the test case.

Signed-off-by: Marc Lopez <marc5.12@outlook.com>
2020-08-26 09:18:51 -06:00
Albert Nigmatzianov
2da4a54c5c Improve tests in doc/ 2017-11-09 07:56:43 +01:00
Daniel Martí
5fa1003a36 Remove unused outs global var 2016-01-06 11:49:16 +01:00
Frank Schroeder
b3f29e98e6 Issue #195: Move doc generation into separate pkg
* Move man_docs and md_docs into new doc pkg
* Replace *bytes.Buffer with io.Writer
* Replace c == cmd.helpCommand with c.IsHelpCommand()
* Remove redundant len(children) == 0 check in HasSeeAlso
* Duplicate test setup for doc generation
2015-12-24 09:01:59 -05:00