Interactive line input
For a complete example of usage of this module, look at the shell example (examples/shell.ml) distributed with Lambda-Term.
Exception raised when the user presses
Ctrl^D with an empty
Returns the common prefix of a list of words.
|(*||An edition action.||*)|
# | Interrupt_or_delete_next_char
|(*||Interrupt if at the beginning of an empty line, or delete the next character.||*)|
# | Complete
|(*||Complete current input.||*)|
# | Complete_bar_next
|(*||Go to the next possible completion in the completion bar.||*)|
# | Complete_bar_prev
|(*||Go to the previous possible completion in the completion bar.||*)|
# | Complete_bar_first
|(*||Goto the beginning of the completion bar.||*)|
# | Complete_bar_last
|(*||Goto the end of the completion bar.||*)|
# | Complete_bar
|(*||Complete current input using the completion bar.||*)|
# | History_prev
|(*||Go to the previous entry of the history.||*)|
# | History_next
|(*||Go to the next entry of the history.||*)|
# | Accept
|(*||Accept the current input.||*)|
# | Clear_screen
|(*||Clear the screen.||*)|
# | Prev_search
|(*||Search backward in the history.||*)|
# | Cancel_search
|(*||Cancel search mode.||*)|
# | Break
# | Suspend
|(*||Suspend the program.||*)|
Type of actions.
doc_of_action action returns a short description of the
action_of_name str converts the given action name into an
action. Action name are the same as variants name but lowercased
and with '_' replaced by '-'. It raises
Not_found if the name
does not correspond to an action. It also recognizes edition
Evaluates the contents of the engine.
set_completion ?index start words sets the current
start is the position of the beginning of the word
being completed and
words is the list of possible
completions with their suffixes.
index is the position in the completion
bar, default to
0. The result is made available
through the completion_words signal.
Ask for computing completion for current input. This method should call set_completion.
Complete current input. This is the method called when the user presses Tab.
Whether to show the box or not. It default to
Abstract version of engine.
Read-line engine for reading a password. The
default to replacing all characters by
'*'. You can also for
example completely disable displaying the password by doing:
method stylise = ([||], 0)
Also showing completion is disabled.
If the input correspond to a keyword, returns its associated
value. otherwise returns
List of keywords with their associated values.
Read a keyword.
Whether the instance is visible.
Class for read-line instances running in a terminal.