Documentation for built-in aliases

This commit is contained in:
rebeccasun31 2023-11-23 00:30:13 +08:00
parent 06e438b4b4
commit 6509ba72df

View file

@ -131,6 +131,10 @@ func rootHelpFunc(f *cmdutil.Factory, command *cobra.Command, args []string) {
}
helpEntries = append(helpEntries, helpEntry{"USAGE", command.UseLine()})
if len(command.Aliases) > 0 {
helpEntries = append(helpEntries, helpEntry{"ALIASES", strings.Join(command.Aliases, "\n")})
}
for _, g := range GroupedCommands(command) {
var names []string
for _, c := range g.Commands {