Module Brr_ocaml_poke_ui.History
Prompt history data structure.
val v : prev:Jstr.t list -> Brr_ocaml_poke_ui.History.tv ~prev initializes the toplevel with previous entries prev (later elements are older).
val empty : Brr_ocaml_poke_ui.History.tempty is an empty history.
val entries : Brr_ocaml_poke_ui.History.t -> Jstr.t listentries h are all the entries in the history.
val add : Brr_ocaml_poke_ui.History.t -> Jstr.t -> Brr_ocaml_poke_ui.History.tadd h e makes adds entry v to history.
val restart : Brr_ocaml_poke_ui.History.t -> Brr_ocaml_poke_ui.History.trestart
val prev :
Brr_ocaml_poke_ui.History.t ->
Jstr.t ->
(Brr_ocaml_poke_ui.History.t * Jstr.t) optionprev h current makes current the next entry of the resulting history and returns the previous entry of h (if any).
val next :
Brr_ocaml_poke_ui.History.t ->
Jstr.t ->
(Brr_ocaml_poke_ui.History.t * Jstr.t) optionnext h current makes current the previous entry of the resulting history and returns the next entry of h (if any).
val to_string : sep:Jstr.t -> Brr_ocaml_poke_ui.History.t -> Jstr.tto_string ~sep t is a string with the entries of t separated by lines that contain sep.
val of_string : sep:Jstr.t -> Jstr.t -> Brr_ocaml_poke_ui.History.tof_string ~sep s is history from s assumed to be entries seperated by lines that contain sep.