mirror of
https://github.com/rclone/rclone.git
synced 2024-11-21 16:03:29 +01:00
docs: move the link to global flags page to the main options header
This commit is contained in:
parent
91c6faff71
commit
6f515ded8f
@ -190,21 +190,21 @@ rclone.org website.`,
|
||||
} else {
|
||||
var out strings.Builder
|
||||
if groupsString := cmd.Annotations["groups"]; groupsString != "" {
|
||||
_, _ = out.WriteString("Options shared with other commands are described next.\n")
|
||||
_, _ = out.WriteString("See the [global flags page](/flags/) for global options not listed here.\n\n")
|
||||
groups := flags.All.Include(groupsString)
|
||||
for _, group := range groups.Groups {
|
||||
if group.Flags.HasFlags() {
|
||||
_, _ = fmt.Fprintf(&out, "\n#### %s Options\n\n", group.Name)
|
||||
_, _ = fmt.Fprintf(&out, "#### %s Options\n\n", group.Name)
|
||||
_, _ = fmt.Fprintf(&out, "%s\n\n", group.Help)
|
||||
_, _ = fmt.Fprintln(&out, "```")
|
||||
_, _ = out.WriteString("```\n")
|
||||
_, _ = out.WriteString(group.Flags.FlagUsages())
|
||||
_, _ = fmt.Fprintln(&out, "```")
|
||||
_, _ = out.WriteString("```\n\n")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_, _ = out.WriteString("See the [global flags page](/flags/) for global options not listed here.\n\n")
|
||||
}
|
||||
_, _ = out.WriteString(`
|
||||
See the [global flags page](/flags/) for global options not listed here.
|
||||
|
||||
`)
|
||||
doc = doc[:startCut] + out.String() + "### See Also" + doc[endCut+12:]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user