Ansi_text.ControlSourceinclude module type of ControlVariant for EraseDisplay options (ANSI-CSI 0-3 J)
Variant for EraseLine options (ANSI-CSI 0-2 K)
type t = | CursorUp of int optionA
*)| CursorDown of int optionB
*)| CursorForward of int optionC
*)| CursorBackward of int optionD
*)| CursorNextLine of int optionE
*)| CursorPrevLine of int optionF
*)| CursorToCol of int optionG
*)| CursorToPos of int option * int optionH
*)| EraseDisplay of clear_screen optionJ
*)| EraseLine of clear_line optionK
*)| ScrollUp of int optionS
*)| ScrollDown of int optionT
*)| Unknown of {}Represents 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__local with type t := tinclude Ppx_compare_lib.Equal.S__local with type t := tinclude Ppx_quickcheck_runtime.Quickcheckable.S with type t := tinclude Sexplib0.Sexpable.S with type t := tinclude Sexplib0.Sexpable.Of_sexp with type t := tinclude Sexplib0.Sexpable.Sexp_of with type t := tMake a Control.t from parsed CSI parameters. For example the parser, when handling:
"\027[;5H"
would invoke:
of_csi [None; Some 5] ~terminal:'H'
yielding:
CursorToPos (None, Some 5)
Converts a Control.t back to an ANSI-CSI string. For example
to_string (CursorToCol (Some 12)) = "\027[12G"