An input specialized for shell completion.
This input allows unfinished option names or values and exposes what kind of
completion is expected.
- author Wouter de Jong
Constants |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
Methods |
public __toString() : string |
public bind(Symfony |
public static fromString(string $inputStr, int $currentIndex) : self Converts a terminal string into tokens. This is required for shell completions without COMP_WORDS support. |
public static fromTokens(array $tokens, int $currentIndex) : self Create an input based on an COMP_WORDS token list.
|
public getCompletionName() : ?string The name of the input option or argument when completing a value.
|
public getCompletionType() : string Returns the type of completion required. TYPE_ARGUMENT_VALUE when completing the value of an input argument
|
public getCompletionValue() : string The value already typed by the user (or empty string). |
public mustSuggestArgumentValuesFor(string $argumentName) : bool |
public mustSuggestOptionValuesFor(string $optionName) : bool |
Properties |
Methods |
protected parseToken(string $token, bool $parseOptions) : bool |
Properties |
private $completionName = NULL |
private $completionType = NULL |
private $completionValue = '' |
private $currentIndex = NULL |
private $tokens = NULL |
Methods |
private getOptionFromToken(string $optionToken) : ?Symfony |
private getRelevantToken() : string The token of the cursor, or the last token if the cursor is at the end of the input. |
private isCursorFree() : bool Whether the cursor is "free" (i.e. at the end of the input preceded by a space). |
Methods |
public static fromString(string $inputStr, int $currentIndex) : self Converts a terminal string into tokens. This is required for shell completions without COMP_WORDS support. |
public static fromTokens(array $tokens, int $currentIndex) : self Create an input based on an COMP_WORDS token list.
|