protected function _dispatch($extra = [])
{
$shell = $this->shiftArgs();
if (!$shell) {
$this->help();
return false;
}
if (in_array($shell, ['help', '--help', '-h'])) {
$this->help();
return true;
}
if (in_array($shell, ['version', '--version'])) {
$this->version();
return true;
}
$Shell = $this->findShell($shell);
$Shell->initialize();
return $Shell->runCommand($this->args, true, $extra);
}