integrations/commander/test/fixtures/argument-default/command.ts
raw| 1 | import commander from "commander"; |
| 2 | import { addCompletionSpecCommand } from "../../../src"; |
| 3 | |
| 4 | const program = new commander.Command(); |
| 5 | |
| 6 | program.addArgument( |
| 7 | new commander.Argument("[timeout]", "timeout in seconds").default(60, "one minute") |
| 8 | ); |
| 9 | |
| 10 | addCompletionSpecCommand(program); |
| 11 | program.parse(process.argv); |