Refresh man pages

- Fix name of man pages for all but the toplevel command
- Set title of all man pages to "GitHub CLI manual"
- Include gh version information in man pages
- Clean up rendering of flags section
- List subcommands for every command
This commit is contained in:
Mislav Marohnić 2021-12-20 17:33:35 +01:00
parent 17291d1d5f
commit 31c7181297
6 changed files with 55 additions and 134 deletions

View file

@ -58,13 +58,7 @@ func run(args []string) error {
}
if *manPage {
header := &docs.GenManHeader{
Title: "gh",
Section: "1",
Source: "",
Manual: "",
}
if err := docs.GenManTree(rootCmd, header, *dir); err != nil {
if err := docs.GenManTree(rootCmd, *dir); err != nil {
return err
}
}

View file

@ -18,7 +18,7 @@ func Test_run(t *testing.T) {
if err != nil {
t.Fatalf("error reading `gh-issue-create.1`: %v", err)
}
if !strings.Contains(string(manPage), `\fBgh issue create`) {
if !strings.Contains(string(manPage), `\fB\fCgh issue create`) {
t.Fatal("man page corrupted")
}