Input prompt display with optional configurable blocks.
| Name | Signature |
|---|---|
prompt:get | prompt:get() -> prompt |
prompt:set | prompt:set(options) |
prompt:get_blocks | prompt:get_blocks() -> blocks |
prompt:set_blocks | prompt:set_blocks(new_blocks) |
new | new(prompt_module_name) -> prompt |
prompt:get() ->
prompt
Return the current prompt string
prompt:set(
options)
Update prompt state from an options table
Merges all keys from options directly into the prompt's __state.
The built-in default prompt uses prompt (display string) and
blocks (list of block names). Custom prompt modules may also
accept lines (total line count) and line (current line index)
to render multi-line indicators.
prompt:get_blocks() ->
blocks
Return the prompt's block list
prompt:set_blocks(
new_blocks)
Replace the prompt's block list
new(
prompt_module_name) ->prompt
Create a new prompt instance from a named module
If prompt_module_name is "default", returns a built-in prompt with
get, set, get_blocks, and set_blocks methods. Otherwise loads
the named module and calls its new(). Returns nil if the module is
not available.