Up

module Console

: sig

Printing on console tty's

#
module Ansi : sig

Handling of ansi codes.

#
val kill_line : unit -> unit
#
val bell : unit -> unit
#
val home_cursor : unit -> unit
#
val save_cursor : unit -> unit
#
val unsave_cursor : unit -> unit
#
type color = [
| `Black
| `Red
| `Green
| `Yellow
| `Blue
| `Magenta
| `Cyan
| `White
]
#
type attr = [
| `Bright
| `Dim
| `Underscore
| `Reverse
| `Bg of color
]
#
val printf : attr list -> ('a, Pervasives.out_channel, unit) Pervasives.format -> 'a
#
val eprintf : attr list -> ('a, Pervasives.out_channel, unit) Pervasives.format -> 'a
#
val output_string : attr list -> Pervasives.out_channel -> string -> unit
#
val output : attr list -> Pervasives.out_channel -> string -> int -> int -> unit
#
val string_with_attr : attr list -> string -> string
end
#
val is_color_tty : unit -> bool
#
val width : unit -> [
| `Cols of int
| `Not_a_tty
| `Not_available
]

The width in characters of the current output. Returns None if stdout is not connected to a tty.

#
val print_list : Pervasives.out_channel -> (string * Ansi.attr list) list -> unit

print a list in a columnize way (like the output of ls)

end