struct Novika::Capabilities::ISystem::PromptConfig
- Novika::Capabilities::ISystem::PromptConfig
- Struct
- Value
- Object
Overview
A thin wrapper around the prompt configuration block of readLine*
.
Defined in:
novika/capabilities/system.crConstant Summary
-
DELIMITERS =
Word.new("delimiters")
-
HISTORY =
Word.new("history")
-
MORE =
Word.new("more?")
-
PROMPT =
Word.new("prompt")
-
SUGGEST =
Word.new("suggest")
Constructors
Instance Method Summary
-
#delimiters? : Quote | Nil
Returns word delimiter quote, if any.
-
#history_entry? : Entry | Nil
Returns the history entry in the carrier block, if any.
-
#more?(expression : String) : Form | Nil
Returns
false
or nil if no more input is expected after expression, otherwise, returns some form that the user assigned "more" to or that they left on top of the stack (interpreted astrue
). -
#prompt?(line_number : Int32) : Quote | Nil
Returns the prompt quote for the given line_number, or nil if no prompt should be used.
-
#suggest?(word : String, prior : String) : Tuple(Quote, Block) | Nil
Returns the title quote followed by suggestions block for the given word and input prior to word.
Constructor Detail
Instance Method Detail
Returns word delimiter quote, if any. The decision of how to interpret the returned quote is up to the caller.
Returns false
or nil if no more input is expected after
expression, otherwise, returns some form that the user
assigned "more" to or that they left on top of the stack
(interpreted as true
).
Returns the prompt quote for the given line_number, or nil if no prompt should be used.