0

Say we have this:

  vorpal.command('find [sumanOptions] [folder]')
  .description('find test files to run')
  .action(function (args: Array<string>, cb: Function) {
     // args => {sumanOptions: 'a b c'}
  });

how can I pass a string of commands ('subcommands') for sumanOptions? something like this:

vorpal> find "a b c" myfolder

such that in the args in the action callback, looks like:

 // args => {sumanOptions: 'a b c'}

is this possible? or is this problem the "subcommands" issue I have been seeing in the issue tracker? I'd like to be able to do this, and so far, have not been able to figure out how to do it.

Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
  • 1
    Running `find "a b c" myfolder` currently gives args `{ options: {}, sumanOptions: 'a b c', folder: 'myfolder' }`. How is that different from what you require? – Halvor Holsten Strand Nov 06 '17 at 10:25
  • my example wasn't good enough - the problem occurs when I include `--` and `-` in the `sumanOptions` option. I will update the question. – Alexander Mills Nov 06 '17 at 18:50

0 Answers0