module LTerm_read_line:sig
..end
exception Interrupt
Ctrl^D
with an empty
input.typeprompt =
LTerm_text.t
typehistory =
Zed_utf8.t list
val common_prefix : string list -> string
val lookup : Zed_utf8.t -> Zed_utf8.t list -> Zed_utf8.t list
lookup word words
lookup for completion of word
into
words
. It returns all words starting with word
.val lookup_assoc : Zed_utf8.t -> (Zed_utf8.t * 'a) list -> (Zed_utf8.t * 'a) list
type
action =
| |
Edit of |
(* |
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.
| *) |
| |
Next_search |
(* |
Search forward in the history.
| *) |
| |
Cancel_search |
(* |
Cancel search mode.
| *) |
| |
Break |
(* |
Raise
Sys.Break . | *) |
| |
Suspend |
(* |
Suspend the program.
| *) |
| |
Edit_with_external_editor |
(* |
Launch external editor.
| *) |
val bindings : action list Zed_input.Make(LTerm_key).t Pervasives.ref
val bind : LTerm_key.t list -> action list -> unit
bind seq actions
associates actions
to the given
sequence.val unbind : LTerm_key.t list -> unit
unbind seq
unbinds seq
.val actions : (action * string) list
Edit
.val doc_of_action : action -> string
doc_of_action action
returns a short description of the
action.val action_of_name : string -> 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.val name_of_action : action -> string
name_of_action act
returns the name of the given action.val macro : action Zed_macro.t
type
mode =
| |
Edition |
(* |
Editing.
| *) |
| |
Search |
(* |
Backward search.
| *) |
| |
Set_counter |
(* |
Setting the macro counter value.
| *) |
| |
Add_counter |
(* |
Adding a value to the macro counter.
| *) |
class virtual['a]
engine :?history:history -> ?clipboard:Zed_edit.clipboard -> ?macro:action Zed_macro.t -> unit ->
object
..end
class virtual['a]
abstract :object
..end
LTerm_read_line.engine
.
class read_line :?history:history -> unit ->
object
..end
class read_password :unit ->
object
..end
type 'a
read_keyword_result =
| |
Rk_value of |
(* |
The user typed a correct keyword and this is its associated
value.
| *) |
| |
Rk_error of |
(* |
The user did not enter a correct keyword and this is what he
typed instead.
| *) |
class['a]
read_keyword :?history:history -> unit ->
object
..end
class virtual['a]
term :LTerm.t ->
object
..end