foreach ($autocomplete($ret) as $value) { // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle)
if (str_starts_with($value,
$tempRet)) { $matches[$numMatches++
] =
$value;
} } } $cursor->
clearLineAfter();
if ($numMatches > 0 && -1 !==
$ofs) { $cursor->
savePosition();
// Write highlighted text, complete the partially entered response
$charactersEntered = \
strlen(trim($this->
mostRecentlyEnteredValue($fullChoice)));
$output->
write('<hl>'.OutputFormatter::
escapeTrailingBackslash(substr($matches[$ofs],
$charactersEntered)).'</hl>'
);
$cursor->
restorePosition();
} } // Reset stty so it behaves normally again
shell_exec('stty '.
$sttyMode);
return $fullChoice;
}