choices now visible in the help message (if available)

This commit is contained in:
mmacierzanka committed 2021-08-10 03:19:17 +02:00
1 parent 45b0589468
commit 8ac97cab53
1 file changed
+5 -3
+5 -3
View File
@@ -232,9 +232,11 @@ export class Command {
let usageTemplate: string = ""; let usageTemplate: string = "";
this.parameters && this.parameters &&
this.parameters.map((e) => { this.parameters.map((e) => {
usageTemplate += `[${e.name} (${e.type}${ usageTemplate += `[${e.name} (${
e.optional ? ", optional" : "" e.choices
})] `; ? e.choices.map((c) => c.name).join(" / ")
: e.type
}${e.optional ? ", optional" : ""})] `;
}); });
return usageTemplate; return usageTemplate;
} }