Default subcommand not possible in example #469

Open
mfowlewebs opened this Issue Nov 12, 2015 · 2 comments

Projects

None yet

3 participants

@mfowlewebs

In Example we have a bunch of subcommands listed, however there is no way to make any of them the default.

I've tried, for example, changing the final subcommand to .command('*', undefined, {isDefault: true}) however it seems to have no impact. Providing a description does worse: it causes file-* does not exist to be returned for either * or default.

@subwiz
subwiz commented Apr 17, 2016 edited

Facing same problem. I have:

program.command('help', null, {isDefault:true})
  .description('display help information.')
  .action(function(){
    program.outputHelp();
  });

program.command('*', null, {noHelp:true})
  .action(function(cmd){
    console.error('unrecognized command: ' + cmd);
    program.outputHelp();
  });

noHelp is working as expected, while isDefault has no impact.

@steelbrain

Bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment