class

Athena::Console::Completion::Input

Inherits Athena::Console::Input::ARGV / Athena::Console::Input / Athena::Console::Input::Streamable / Athena::Console::Input::Interface / Reference / Object

A specialization of ACON::Input::ARGV that allows for unfinished name/values. Exposes information about the name, type, and value of the value/name being completed.

Constructors

from_string(input : String, current_index : Int32) : self
Source
from_tokens(tokens : Array(String), current_index : Int32) : self
Source

Instance methods

bind(definition : ACON::Input::Definition) : Nil

Binds the provided definition to self. Essentially provides what should be parsed from self.

ameba:disable Metrics/CyclomaticComplexity

Source
completion_name

Returns the name of the argument/option when completing a value.

Source
completion_type

Returns which type of completion is required.

Source
completion_value

Returns the value typed by the user, or empty string.

Source
must_suggest_argument_values_for?(argument_name : String) : Bool

Returns true if this input is able to suggest values for the provided argument_name.

Source
must_suggest_option_values_for?(option_name : String) : Bool

Returns true if this input is able to suggest values for the provided option_name.

Source
relevant_token

Returns the current token of the cursor, or last token if the cursor is at the end of the input.

Source

Nested types