Skip to content

Commit

Permalink
only output help for subcommands, no aliases (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
purplecabbage committed Sep 16, 2022
1 parent b708239 commit e92674d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/help/index.ts
Expand Up @@ -155,7 +155,12 @@ export class Help extends HelpBase {
}

if (subCommands.length > 0) {
this.log(this.formatCommands(subCommands))
const aliases:string[] = []
const uniqueSubCommands:Interfaces.Command.Loadable[] = subCommands.filter(p => {
aliases.push(...p.aliases)
return !aliases.includes(p.id)
})
this.log(this.formatCommands(uniqueSubCommands))
this.log('')
}
}
Expand Down

0 comments on commit e92674d

Please sign in to comment.