LTerm_read_lineSourceInteractive 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 input.
Type of prompts.
Type of histories. It is a list of entries from the most recent to the oldest.
Returns the common prefix of a list of words.
Returns the common prefix of a list of words.
lookup word words lookup for completion of word into words. It returns all words starting with word.
lookup_assoc word words does the same as lookup but works on associative list.
type action = | Edit of LTerm_edit.actionAn edition action.
*)| Interrupt_or_delete_next_charInterrupt if at the beginning of an empty line, or delete the next character.
*)| CompleteComplete current input.
*)| Complete_bar_nextGo to the next possible completion in the completion bar.
*)| Complete_bar_prevGo to the previous possible completion in the completion bar.
*)| Complete_bar_firstGoto the beginning of the completion bar.
*)| Complete_bar_lastGoto the end of the completion bar.
*)| Complete_barComplete current input using the completion bar.
*)| History_prevGo to the previous entry of the history.
*)| History_nextGo to the next entry of the history.
*)| History_search_prevSearch the previous entry of the history.
*)| History_search_nextSearch the next entry of the history.
*)| AcceptAccept the current input.
*)| Clear_screenClear the screen.
*)| Prev_searchSearch backward in the history.
*)| Next_searchSearch forward in the history.
*)| Cancel_searchCancel search mode.
*)| BreakRaise Sys.Break.
| SuspendSuspend the program.
*)| Edit_with_external_editorLaunch external editor.
*)Type of actions.
Bindings.
bind seq actions associates actions to the given sequence.
unbind seq unbinds seq.
doc_of_action action returns a short description of the action.
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 actions.
The global macro recorder.
The current read-line mode.
class virtual 'a engine : ?history:history -> ?clipboard:Zed_edit.clipboard -> ?macro:action
Zed_macro.t ->
unit -> object ... endThe read-line engine. If no clipboard is provided, LTerm_edit.clipboard is used. If no macro recorder is provided, macro is used.
Simple read-line engine which returns the result as a string.
Read-line engine for reading a password. The stylise method default to replacing all characters by '*'. You can also for example completely disable displaying the password by doing:
type 'a read_keyword_result = | Rk_value of 'aThe user typed a correct keyword and this is its associated value.
*)| Rk_error of Zed_string.tThe user did not enter a correct keyword and this is what he typed instead.
*)The result of reading a keyword.
Read a keyword.