We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b57ba3 commit 0d0d2ecCopy full SHA for 0d0d2ec
src/usage.ts
@@ -66,8 +66,11 @@ export async function renderUsage<T extends ArgsDef = ArgsDef>(
66
67
if (cmd.subCommands) {
68
const commandNames: string[] = [];
69
- for (const [name, sub] of Object.entries(cmd.subCommands)) {
70
- commandsLines.push([name, sub.meta?.description || ""]);
+ const subCommands = await resolveValue(cmd.subCommands);
+ for (const [name, sub] of Object.entries(subCommands)) {
71
+ const subCmd = await resolveValue(sub);
72
+ const meta = await resolveValue(subCmd?.meta);
73
+ commandsLines.push([name, meta?.description || ""]);
74
commandNames.push(name);
75
}
76
usageLine.push(commandNames.join("|"));
0 commit comments