-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugCommander is not working as intendedCommander is not working as intended
Description
In this example, I'd like to disable impilcit help option and only leave impicit help command.
test.mjs:
#!/usr/bin/env node
import { Command } from 'commander';
const cmd = new Command ();
cmd
.helpOption (false)
.command ('meow')
.option ('-l, [--loud]')
cmd.parse ();
If I run test.mjs, I get
Usage: test [command]
Commands:
meow [options]
help [command] display help for command
as expected, but if I run test.mjs help meow, I get an error:
error: unknown option '--help' // what option, I thought I was calling help command?,
while expected outcome would be
Usage: test meow [options]
Options:
-l, [--loud]
Metadata
Metadata
Assignees
Labels
bugCommander is not working as intendedCommander is not working as intended