File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ const createCommandFile = async (nestedCategory,docs) => {
132
132
// ARGUMENTS string
133
133
docs . command . shift ( ) ;
134
134
if ( docs . positionals . length ) {
135
- const argumentsString = `### Arguments\n\nOption | Default | Description\n--------- | ----------- | -----------\n${ docs . positionals } ` ;
135
+ const argumentsString = `### Arguments\n\nOption | Alias | Default | Description\n--------- | --------- | ----------- | -----------\n${ docs . positionals } ` ;
136
136
if ( skeletonFileExists ) {
137
137
finalFileString = finalFileString . replace ( '{{ARGUMENTS}}' , argumentsString ) ;
138
138
} else {
@@ -144,7 +144,7 @@ const createCommandFile = async (nestedCategory,docs) => {
144
144
if ( docs . options ) {
145
145
let optionsString = '' ;
146
146
_ . forEach ( docs . options , ( options , group ) => {
147
- optionsString = `### ${ group } \n\nOption | Default | Description\n--------- | ----------- | -----------\n${ options } ` + optionsString ;
147
+ optionsString = `### ${ group } \n\nOption | Alias | Default | Description\n--------- | --------- | ----------- | -----------\n${ options } ` + optionsString ;
148
148
} ) ;
149
149
if ( skeletonFileExists ) {
150
150
finalFileString = finalFileString . replace ( '{{OPTIONS}}' , optionsString ) ;
Original file line number Diff line number Diff line change @@ -228,8 +228,16 @@ class Command {
228
228
} ) ;
229
229
description += choicesString ;
230
230
}
231
+ let aliases = '' ;
232
+ if ( option . value . alias ) {
233
+ let aliasString = '' ;
234
+ _ . forEach ( option . value . alias , ( alias ) => {
235
+ aliasString += `- ${ alias } ` ;
236
+ } ) ;
237
+ aliases += aliasString ;
238
+ }
231
239
const defaultValue = option . value . default || '' ;
232
- res . options [ group ] += `--${ key } | ${ defaultValue } | ${ description } \n` ;
240
+ res . options [ group ] += `--${ key } | ${ aliases } | ${ defaultValue } | ${ description } \n` ;
233
241
} ) ;
234
242
235
243
res . examples = '' ;
You can’t perform that action at this time.
0 commit comments