Skip to content

Commit 6f8499d

Browse files
alan-agius4dgp1130
authored andcommitted
fix(@angular/cli): display option descriptions during auto completion
It appears that enabling this no longer causes a slugish experience.
1 parent e1ee636 commit 6f8499d

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

packages/angular/cli/src/command-builder/command-runner.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,12 @@ export async function runCommand(args: string[], logger: logging.Logger): Promis
121121
localYargs = addCommandModuleToYargs(localYargs, CommandModule, context);
122122
}
123123

124-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
125-
const usageInstance = (localYargs as any).getInternalMethods().getUsageInstance();
126124
if (jsonHelp) {
125+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
126+
const usageInstance = (localYargs as any).getInternalMethods().getUsageInstance();
127127
usageInstance.help = () => jsonHelpUsage();
128128
}
129129

130-
if (getYargsCompletions) {
131-
// When in auto completion mode avoid printing description as it causes a slugish
132-
// experience when there are a large set of options.
133-
usageInstance.getDescriptions = () => ({});
134-
}
135-
136130
await localYargs
137131
.scriptName('ng')
138132
// https://github.com/yargs/yargs/blob/main/docs/advanced.md#customizing-yargs-parser

0 commit comments

Comments
 (0)