class CryPrompt::AutoComplete
- CryPrompt::AutoComplete
- Reference
- Object
Defined in:
autocomplete.crConstructors
Instance Method Summary
- #box_color : Colorize::Color
- #box_color=(box_color : Colorize::Color)
- #box_text_background_color : Colorize::Color
- #box_text_background_color=(box_text_background_color : Colorize::Color)
- #box_text_foreground_color : Colorize::Color
- #box_text_foreground_color=(box_text_foreground_color : Colorize::Color)
- #case_sensitive : Bool
- #case_sensitive=(case_sensitive : Bool)
- #chose_from_render
-
#clear_line_below(current_line_index)
dont use this just use print Keys::ClearScreenBelow
- #clear_x_below(number_of_lines, current_line_index)
-
#completion : JSON::Any | YAML::Any | Nil
load a yaml or json hash to parse from you still need to call update_suggestions to parse it
-
#completion=(completion : JSON::Any | YAML::Any | Nil)
load a yaml or json hash to parse from you still need to call update_suggestions to parse it
- #get_terminal_size
-
#print_suggestions(opts : Array(String), word : String = "", current_line_index : Int32 = 0)
bash style single line tab suggest
-
#render(opts : Array(CryPromptTrie), current_line_index, word, tabc = -1, prompt_size = 2, line_size = 0)
will render a suggestion box just below the word the person is typing
-
#render_box(opts : Array(String), selected_index : Int32 = -1, max_suggested : Int32 = 5, min_width_size : Int32 = 4)
NOT WORKING (probably due to scos/rc) draws the box with the suggestions in it.
-
#suggestion_nodes(line : String, trie = @sugtrie) : Array(CryPromptTrie) | Nil
returns an array of words from the sugtrie that fall in line with the given line
-
#suggestions(line : String, trie = @sugtrie) : Array(String) | Nil
returns an array of words from the sugtrie that fall in line with the given line
- #sugtrie : CryPromptTrie
- #sugtrie=(sugtrie : CryPromptTrie)
-
#update_suggestions(completion : JSON::Any | YAML::Any = @completion, trie : CryPromptTrie = @sugtrie)
recursive function to generate the suggestion trie from a json or yaml structure
Constructor Detail
Instance Method Detail
load a yaml or json hash to parse from you still need to call update_suggestions to parse it
load a yaml or json hash to parse from you still need to call update_suggestions to parse it
bash style single line tab suggest
will render a suggestion box just below the word the person is typing
NOT WORKING (probably due to scos/rc) draws the box with the suggestions in it. selected_index is the index in opts that will be selected to be highlighted max_size is the width of the box max_suggested is how many items will be suggested at the maximum
returns an array of words from the sugtrie that fall in line with the given line
returns an array of words from the sugtrie that fall in line with the given line
recursive function to generate the suggestion trie from a json or yaml structure