Debian Codegraph @

integrations/commander/test/fixtures/options-choices/command.ts

raw
1 import commander from "commander";
2 import { addCompletionSpecCommand } from "../../../src";
3
4 const program = new commander.Command();
5
6 program.addOption(
7 new commander.Option("-d, --drink <size>", "drink cup size").choices(["small", "medium", "large"])
8 );
9
10 addCompletionSpecCommand(program);
11 program.parse(process.argv);