webmozart/console

How to set default command?

leonardovilarinho opened this issue · 1 comments

Hi, thanks for the library!

I have a program with the run command, how to set it as the default command?

My code:

$this->beginCommand('run')
                ->markDefault()
                ->setDescription('Run analizer metrics')
                ->setHandler(new \Insphptor\Program\Commands\RunCommand())
                ->beginSubCommand('export')
                    ->setHandlerMethod('export')
                    ->setDescription('Export result in ' . config()['export'] . ' file')
                    ->addArgument('view', Argument::OPTIONAL, 'The view system', 'default')
                    ->addOption('open', 'o', Option::BOOLEAN, 'Open server with result in view')
                ->end()
        ->end();

The markDefault no work, has alternative for it?

I currently have the same problem. I would really appreciate a solution.