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

filterResults() protected method

Filter out results that don't match the current word on the command line
protected filterResults ( array $array ) : string[]
$array array
return string[]
    protected function filterResults(array $array)
    {
        $curWord = $this->context->getCurrentWord();
        return array_filter($array, function ($val) use($curWord) {
            return fnmatch($curWord . '*', $val);
        });
    }