Ansi_text.Controlinclude module type of Controltype t = | CursorUp of int option| CursorDown of int option| CursorForward of int option| CursorBackward of int option| CursorNextLine of int option| CursorPrevLine of int option| CursorToCol of int option| CursorToPos of int option * int option| EraseDisplay of clear_screen option| EraseLine of clear_line option| ScrollUp of int option| ScrollDown of int option| Unknown of stringRepresents a subset of the ANSI-CSI spec: https://en.wikipedia.org/wiki/ANSI_escape_code#Control_Sequence_Introducer_commands
include Ppx_compare_lib.Comparable.S with type t := tinclude Ppx_compare_lib.Comparable.S__local with type t := tinclude Ppx_compare_lib.Equal.S with type t := tinclude Ppx_compare_lib.Equal.S__local with type t := tinclude Ppx_quickcheck_runtime.Quickcheckable.S with type t := tval quickcheck_generator : t Base_quickcheck.Generator.tval quickcheck_observer : t Base_quickcheck.Observer.tval quickcheck_shrinker : t Base_quickcheck.Shrinker.tinclude Sexplib0.Sexpable.S with type t := tinclude Sexplib0.Sexpable.Of_sexp with type t := tval t_of_sexp : Sexplib0.Sexp.t -> tinclude Sexplib0.Sexpable.Sexp_of with type t := tval sexp_of_t : t -> Sexplib0.Sexp.tval of_csi : params:string -> terminal:char -> tMake a Control.t from bytes extracted from a parsed string. For example the parser, when handling:
"\027[;5H"
would invoke:
of_csi ~params:";5" ~terminal:'H'
yielding:
CursorToPos (None, Some 5)
val to_string : t -> stringConverts a Control.t back to an ANSI-CSI string. For example
to_string (CursorToCol (Some 12)) = "\027[12G"val to_string_hum : t -> stringA somewhat human-readable name for what the control sequence does.