Skip to content

Commit d2d4535

Browse files
committed
improves Usage message
1 parent dfce70c commit d2d4535

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/cli/usage.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ var hiddenCommands = []string{
3535
func DefaultUsageFunc(c *ffcli.Command) string {
3636
var b strings.Builder
3737

38+
fmt.Fprintf(&b, "continuous profiling platform\n\n")
3839
headerClr.Fprintf(&b, "USAGE\n")
3940
if c.ShortUsage != "" {
4041
fmt.Fprintf(&b, " %s\n", c.ShortUsage)
@@ -85,6 +86,10 @@ func DefaultUsageFunc(c *ffcli.Command) string {
8586
// fmt.Fprintf(&b, "\n")
8687
}
8788

89+
if len(c.Subcommands) > 0 {
90+
b.WriteString("Run 'pyroscope SUBCOMMAND --help' for more information on a subcommand.\n")
91+
}
92+
8893
return strings.ReplaceAll(b.String(), "@new-line@", "\n")
8994
}
9095

0 commit comments

Comments
 (0)