Skip to content

Commit

Permalink
Merge 8f6c10c into 771bbd9
Browse files Browse the repository at this point in the history
  • Loading branch information
GiladShoham authored Apr 20, 2020
2 parents 771bbd9 + 8f6c10c commit eaaa054
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/extensions/cli/legacy-command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class LegacyCommand implements Command {
this.shortDescription = summery;
this.group = group;
this.loader = cmd.loader;
this.private = cmd.private;
this.migration = cmd.migration;

this.commands = cmd.commands.map(sub => {
Expand Down
6 changes: 3 additions & 3 deletions src/extensions/paper/commands/help.cmd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import { Command } from '../command';
export function Help(Renderer = DefaultHelpRender) {
return function getHelpProps(commands: { [k: string]: Command }, groups: { [k: string]: string }) {
const help: HelpProps = Object.entries(commands)
.filter(([_name, command]) => !command.private && !!command.shortDescription)
.filter(([_name, command]) => !command.private && (command.shortDescription || command.description))
.reduce(function(partialHelp, [id, command]) {
partialHelp[command.group!] = partialHelp[command.group!] || {
commands: {},
description: groups[command.group!] || ''
description: groups[command.group!] || command.group
};
partialHelp[command.group!].commands[id] = command.shortDescription;
partialHelp[command.group!].commands[id] = command.shortDescription || command.description;
return partialHelp;
}, {});
return render(<Renderer {...help} />);
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/paper/paper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class Paper {
command.alias = command.alias || '';
command.description = command.description || '';
command.shortDescription = command.shortDescription || '';
command.group = command.group || 'extensions';
command.group = command.group || 'ungrouped';
command.options = command.options || [];
command.private = command.private || false;
command.loader = command.loader || true;
Expand Down

0 comments on commit eaaa054

Please sign in to comment.