cmdliner
cmdliner copied to clipboard
ANSI styled error messages
Since isatty
seems to be bound to make it in the stdlib (https://github.com/ocaml/ocaml/pull/11128), I'm willing to use caml_sys_tty
primitive (available since this https://github.com/ocaml/ocaml/commit/a69e3e3099bdd26e2db986ab0e43add9309bcc79 which went into 4.03
).
Nothing fancy except turning quoted material into bold.
A few things would need to be sorted out though, e.g. how to control it via a default option (mandatory or not) and interaction with existing user options like Fmt_cli
provides that do the same.
I guess people are going to mention the NO_COLOR
environment variable but it's a rather stupid standard, this comment explains it well.