package opam-core
Install
dune-project
Dependency
Authors
-
VVincent Bernardoff <vb@luminar.eu.org>
-
RRaja Boujbel <raja.boujbel@ocamlpro.com>
-
RRoberto Di Cosmo <roberto@dicosmo.org>
-
TThomas Gazagnaire <thomas@gazagnaire.org>
-
LLouis Gesbert <louis.gesbert@ocamlpro.com>
-
FFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
-
AAnil Madhavapeddy <anil@recoil.org>
-
GGuillem Rieu <guillem.rieu@ocamlpro.com>
-
RRalf Treinen <ralf.treinen@pps.jussieu.fr>
-
FFrederic Tuong <tuong@users.gforge.inria.fr>
Maintainers
Sources
md5=0b798434a6275212ec58922068cde186
sha512=14737dc994be2c54dfeaf2658d3713178033e1bc2b4b845a58b4bfc118bbbf12b502924add0ae32b4b2b6c1944462e5ee7143df3de362d9ee39573249d013bc9
doc/opam-core/OpamConsole/index.html
Module OpamConsole
Source
Console output, ANSI color, logging and user querying
Global configuration parameters (read from OpamGlobalConfig, and the environment when necessary)
General text formatting
Settable attributes for ANSI terminal output. Nesting is generally not handled.
Helper coloring functions. Returns the string unchanged if color is disabled
val utf8_symbol :
OpamCompat.Uchar.t ->
?alternates:OpamCompat.Uchar.t list ->
string ->
string
Logging
Timers, only active when debug is on. Returns the time between the application to each argument, in seconds
log section ~level fmt args
. Used for debug messages, default level is 1
Helper to pass stringifiers to log (use log "%a" (slog to_string) x
rather than log "%s" (to_string x)
to avoid costly unneeded stringifications
Message without prefix, reformat or newline, to stderr (useful to continue error messages without repeating "ERROR
")
Erase the current line on stdout (doesn't flush stdout)
Display a dynamic status line to stdout, that will be erased on next call. The message should not be wider than screen nor contain newlines. Use clear_status
when the status line should be erased.
Erase the status line and restore the cursor to the start of the line
Ask the user to press Y/y/N/n to continue (returns a boolean). Defaults to true (yes) if unspecified
Read some input from the user (returns a string option)
val print_table :
?cut:[ `Wrap of string | `Truncate | `None ] ->
out_channel ->
sep:string ->
string list list ->
unit
Prints a table; generally called on tables passed through align_table
. The default cut
is to wrap on stdout, stderr, keep as-is otherwise. `Wrap sep
prepends sep
on wrapped lines