Module Console.AnsiSource

Handling of ansi codes.

Sourceval kill_line : unit -> unit
Sourceval erase_to_end_of_screen : unit -> unit
Sourceval erase_to_start_of_screen : unit -> unit
Sourceval erase_all : unit -> unit
Sourceval bell : unit -> unit
Sourceval home : unit -> unit
Sourceval home_cursor : unit -> unit
Sourceval cursor_up : unit -> unit
Sourceval cursor_down : unit -> unit
Sourceval cursor_backward : unit -> unit
Sourceval cursor_forward : unit -> unit
Sourceval save_cursor : unit -> unit
Sourceval unsave_cursor : unit -> unit

printf and eprintf do not emit OSC 8 hyperlink escapes: any `Url _ attributes in style are silently dropped. Use string_with_attr or output_string if you need hyperlink support.

Sourceval printf : attr list -> ('a, Core.Out_channel.t, unit) Core.format -> 'a
Sourceval eprintf : attr list -> ('a, Core.Out_channel.t, unit) Core.format -> 'a

output_string and output honor `Url _ attrs by wrapping the output in OSC 8 hyperlink escapes when the terminal is color-capable.

Sourceval output_string : attr list -> Core.Out_channel.t -> string -> unit
Sourceval output : attr list -> Core.Out_channel.t -> Core.Bytes.t -> int -> int -> unit
Sourceval string_with_attr : attr list -> string -> string @@ portable

Create a string with embedded SGR and OSC 8 formatting codes.

See Ansi_kernel.Attr.t for the semantics of each attribute; in particular, `Url _ wraps string in an OSC 8 hyperlink escape.

Raises if the URL contains control characters.