Stecman\Component\Symfony\Console\BashCompletion\CompletionHandler::completeForOptionValues PHP Method

completeForOptionValues() protected method

Attemp to complete the current word as the value of a long-form option
protected completeForOptionValues ( ) : array | false
return array | false
    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;
    }