function CompletionInput::fromTokens
Create an input based on an COMP_WORDS token list.
Parameters
string[] $tokens the set of split tokens (e.g. COMP_WORDS or argv):
int $currentIndex the index of the cursor (e.g. COMP_CWORD):
3 calls to CompletionInput::fromTokens()
- CommandCompletionTester::complete in vendor/
symfony/ console/ Tester/ CommandCompletionTester.php - Create completion suggestions from input tokens.
- CompleteCommand::createCompletionInput in vendor/
symfony/ console/ Command/ CompleteCommand.php - CompletionInput::fromString in vendor/
symfony/ console/ Completion/ CompletionInput.php - Converts a terminal string into tokens.
File
-
vendor/
symfony/ console/ Completion/ CompletionInput.php, line 58
Class
- CompletionInput
- An input specialized for shell completion.
Namespace
Symfony\Component\Console\CompletionCode
public static function fromTokens(array $tokens, int $currentIndex) : self {
$input = new self($tokens);
$input->tokens = $tokens;
$input->currentIndex = $currentIndex;
return $input;
}