function CompletionInput::fromString
Converts a terminal string into tokens.
This is required for shell completions without COMP_WORDS support.
1 call to CompletionInput::fromString()
- GlobalCommand::complete in vendor/
composer/ composer/ src/ Composer/ Command/ GlobalCommand.php - @inheritdoc
File
-
vendor/
symfony/ console/ Completion/ CompletionInput.php, line 45
Class
- CompletionInput
- An input specialized for shell completion.
Namespace
Symfony\Component\Console\CompletionCode
public static function fromString(string $inputStr, int $currentIndex) : self {
preg_match_all('/(?<=^|\\s)([\'"]?)(.+?)(?<!\\\\)\\1(?=$|\\s)/', $inputStr, $tokens);
return self::fromTokens($tokens[0], $currentIndex);
}