diff --git a/man_docs.go b/man_docs.go index 36bbf26..3e852f7 100644 --- a/man_docs.go +++ b/man_docs.go @@ -47,8 +47,14 @@ func (cmd *Command) GenManTree(header *GenManHeader, dir string) { } out := new(bytes.Buffer) + needToResetTitle := header.Title == "" + cmd.GenMan(header, out) + if needToResetTitle { + header.Title = "" + } + filename := cmd.CommandPath() filename = dir + strings.Replace(filename, " ", "-", -1) + ".1" outFile, err := os.Create(filename)