protected function completeForOptionValues()
{
$wordIndex = $this->context->getWordIndex();
if ($this->command && $wordIndex > 1) {
$left = $this->context->getWordAtIndex($wordIndex - 1);
if (strpos($left, '--') === 0) {
$name = substr($left, 2);
$def = $this->command->getNativeDefinition();
if (!$def->hasOption($name)) {
return false;
}
$opt = $def->getOption($name);
if ($opt->isValueRequired() || $opt->isValueOptional()) {
return $this->completeOption($opt);
}
}
}
return false;
}