$input =
new self($tokens);
$input->tokens =
$tokens;
$input->currentIndex =
$currentIndex;
return $input;
} public function bind(InputDefinition
$definition): void
{ parent::
bind($definition);
$relevantToken =
$this->
getRelevantToken();
if ('-' ===
$relevantToken[0
]) { // the current token is an input option: complete either option name or option value
[$optionToken,
$optionValue] =
explode('=',
$relevantToken, 2
) +
['', ''
];
$option =
$this->
getOptionFromToken($optionToken);
if (null ===
$option && !
$this->
isCursorFree()) { $this->completionType = self::TYPE_OPTION_NAME;
$this->completionValue =
$relevantToken;
return;
}