From 829e0c25eef805a2ba4a43a92607a58ff204a63b Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Sat, 30 Sep 2023 15:46:55 +0100 Subject: [PATCH] Register completions command to aid with shell auto complete --- cli/main.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cli/main.ts b/cli/main.ts index 203b9bdb..f331e351 100755 --- a/cli/main.ts +++ b/cli/main.ts @@ -3,7 +3,10 @@ // @deno-types="../scripts/dist/fabric-template-generator.d.ts" import * as generator from "../scripts/dist/fabric-template-generator.js"; import { parse as parseXml } from "https://deno.land/x/xml@2.1.1/mod.ts"; -import { Command } from "https://deno.land/x/cliffy@v0.25.7/command/mod.ts"; +import { + Command, + CompletionsCommand, +} from "https://deno.land/x/cliffy@v0.25.7/command/mod.ts"; import { initCommand } from "./commands/init.ts"; import { upgradeCommand } from "./commands/upgrade.ts"; @@ -24,7 +27,8 @@ if (import.meta.main) { Deno.exit(0); }) .command("init", initCommand()) - .command("upgrade", upgradeCommand()); + .command("upgrade", upgradeCommand()) + .command("completions", new CompletionsCommand()); await cmd.parse(); }