Skip to content

Add support for long help strings for child commands #4

@fgrehm

Description

@fgrehm

@cv looks like it is only supported for top level commands READMEs:

sd/cli/cli.go

Lines 195 to 201 in 594ccd5

if err == nil {
logrus.Debug("Found README at: ", readmePath)
cmd.Short = strings.Split(string(readme), "\n")[0]
cmd.Long = string(readme)
cmd.Args = cobra.NoArgs
cmd.RunE = showUsage
}

I think we'd need something smart to handle this here:

sd/cli/cli.go

Lines 304 to 312 in 594ccd5

cmd := &cobra.Command{
Use: filepath.Base(path),
Short: shortDesc,
Example: example,
Annotations: map[string]string{
"Source": path,
},
RunE: execCommand,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions