Enkaidu::CLI::QueryReader
Command-line query reader with editing and other capabilities.
Constants
DELIMETERS = {{ " \n\t'\"=".chars }}
PATH_DOC = "`Tab` / `Shift-Tab` select choices. `Esc` + `Tab` to restart auto-completion within a sub-folder."
Constructors
new(runtime : Enkaidu::Runtime, styler : Enkaidu::Console::StyleApplicator, input_history_file : String | Nil = nil)
SourceInstance methods
Override to integrate auto-completion.
current_word is picked following word_delimiters.
It expects to return Tuple with:
- a title :
String - the auto-completion results :
Array(String)
default: {"", [] of String}
documentation(entry : String)
Override to set the entire documentation for an autocompletion entry.
If not nil, the documentation is shown in its own alternate screen when alt-d is pressed.
default: nil
history_file
Override to indicate the Path|String|IO where the history is saved. If nil, the history is not persistent.
default: nil
prefix
SourceOverride to customize the prompt.
Toggle the colorization following color.
default: $:001>
Macros
cached_doc(name, doc_generator)
Macro, because we don't want the doc generator to execute before we check the cache