Skip to content

Commit 366dea9

Browse files
committed
fix(completions): complete deploy targets for generate too
1 parent 9d2e569 commit 366dea9

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/nuxt-cli/src/completions.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ export async function initCompletions<T extends ArgsDef = ArgsDef>(command: Comm
2626
}
2727
}
2828

29-
const buildCommand = completion.commands.get('build')
30-
if (buildCommand) {
29+
for (const command of ['build', 'generate']) {
3130
for (const name of ['target', 'preset']) {
32-
const option = buildCommand.options.get(name)
31+
const option = completion.commands.get(command)?.options.get(name)
3332
if (option) {
3433
option.handler = (complete) => {
3534
for (const preset of nitroPresets) {

0 commit comments

Comments
 (0)