Skip to content

Commit 913085c

Browse files
committed
udpate the help parsing
1 parent 76cf9a5 commit 913085c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

command-help-cmd.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,17 @@ func (thisRef *Command) showUsage() {
143143
fmt.Println(fmt.Sprintf(" %s ", constVerticalLine) + strings.Repeat(constThinHorizontalLine, constShortLineLength-12))
144144
}
145145

146-
for _, originalC := range commandsWithSubCommands {
147-
if originalC.Name == strings.TrimSpace(c.Name) {
148-
paddedSubCommands := paddedCommands(originalC.subCommands)
149-
for _, subC := range paddedSubCommands {
150-
fmt.Println(fmt.Sprintf(" %s %s %s %s", constVerticalLine, subC.Name, constVerticalLine, subC.Description))
151-
}
152-
153-
break
154-
}
146+
// for _, originalC := range commandsWithSubCommands {
147+
// if originalC.Name == strings.TrimSpace(c.Name) {
148+
paddedSubCommands := paddedCommands(c.subCommands)
149+
for _, subC := range paddedSubCommands {
150+
fmt.Println(fmt.Sprintf(" %s %s %s %s", constVerticalLine, subC.Name, constVerticalLine, subC.Description))
155151
}
156152

153+
// break
154+
// }
155+
// }
156+
157157
}
158158
}
159159
}
@@ -299,6 +299,7 @@ func paddedCommands(input []*Command) []Command {
299299
Description: definedCommandPaddedDescription,
300300
Hidden: val.Hidden,
301301
PassThrough: val.PassThrough,
302+
subCommands: val.subCommands,
302303
})
303304
}
304305

0 commit comments

Comments
 (0)