Skip to content

Commit b2509de

Browse files
committed
fix(help): properly show option decorations
1 parent 23d0db6 commit b2509de

File tree

1 file changed

+7
-1
lines changed
  • packages/@ionic/cli-utils/src/lib

1 file changed

+7
-1
lines changed

packages/@ionic/cli-utils/src/lib/help.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ const IONIC_LOGO = String.raw`
1414

1515
type Decoration = [string, string];
1616

17+
const OPTION_DECORATIONS: Decoration[] = [
18+
[OptionGroup.Beta, chalk.red.bold('(beta)')],
19+
[OptionGroup.Deprecated, chalk.yellow.bold('(deprecated)')],
20+
[OptionGroup.Experimental, chalk.red.bold('(experimental)')],
21+
];
22+
1723
const COMMAND_DECORATIONS: Decoration[] = [
1824
[CommandGroup.Beta, chalk.red.bold('(beta)')],
1925
[CommandGroup.Deprecated, chalk.yellow.bold('(deprecated)')],
@@ -118,7 +124,7 @@ export class CommandStringHelpFormatter extends BaseCommandStringHelpFormatter<I
118124
}
119125

120126
async formatBeforeOptionSummary(opt: CommandMetadataOption): Promise<string> {
121-
return opt.hint ? `${opt.hint} ` : '';
127+
return (opt.hint ? `${opt.hint} ` : '') + formatGroupDecorations(OPTION_DECORATIONS, opt.groups);
122128
}
123129
}
124130

0 commit comments

Comments
 (0)