@@ -35,6 +35,7 @@ export class MarkdownCommand extends MarkdownBase {
3535 private state : unknown ;
3636 private deprecated : boolean ;
3737 private deprecationDetails : { version ?: string ; to ?: string } | null ;
38+ private aliases : string [ ] ;
3839
3940 public constructor (
4041 topic : string ,
@@ -90,6 +91,7 @@ export class MarkdownCommand extends MarkdownBase {
9091 this . deprecated = ( command . deprecated as boolean ) ?? this . state === 'deprecated' ?? false ;
9192 const dep = command . deprecated ;
9293 this . deprecationDetails = dep && typeof dep === 'object' ? ( dep as { version ?: string ; to ?: string } ) : null ;
94+ this . aliases = command . aliases ?? [ ] ;
9395 }
9496
9597 protected async generate ( ) : Promise < string > {
@@ -116,7 +118,7 @@ export class MarkdownCommand extends MarkdownBase {
116118 }
117119
118120 if ( this . help . length > 0 ) {
119- lines . push ( `## Description for ${ this . commandName } ` ) ;
121+ lines . push ( `## Description for " ${ this . commandName } " ` ) ;
120122 lines . push ( '' ) ;
121123 for ( const paragraph of convertHyphenListsToMarkdown (
122124 this . help . map ( ( p ) => applyCodeFormatting ( escapeAngleBrackets ( p ) ) )
@@ -126,6 +128,15 @@ export class MarkdownCommand extends MarkdownBase {
126128 }
127129 }
128130
131+ if ( this . aliases . length > 0 ) {
132+ lines . push ( `## Aliases for "${ this . commandName } "` ) ;
133+ lines . push ( '' ) ;
134+ for ( const alias of this . aliases ) {
135+ lines . push ( `\`${ alias } \`` ) ;
136+ lines . push ( '' ) ;
137+ }
138+ }
139+
129140 if ( parameters . length > 0 ) {
130141 lines . push ( '## Flags' ) ;
131142 lines . push ( '' ) ;
@@ -141,7 +152,7 @@ export class MarkdownCommand extends MarkdownBase {
141152 }
142153
143154 if ( this . examples . length > 0 ) {
144- lines . push ( `## Examples for ${ this . commandName } ` ) ;
155+ lines . push ( `## Examples for " ${ this . commandName } " ` ) ;
145156 lines . push ( '' ) ;
146157 for ( const example of this . examples ) {
147158 if ( example . description ) {
0 commit comments