From: Eric Cooper <ecc@cmu.edu>
To: caml-list@yquem.inria.fr, caml-list@inria.fr
Subject: Re: [Caml-list] color on linux terminal
Date: Sat, 13 Jan 2007 15:56:36 -0500 [thread overview]
Message-ID: <20070113205636.GB24042@localhost> (raw)
In-Reply-To: <slrneqig8s.8ek.mweihs@localhost.localdomain>
On Sat, Jan 13, 2007 at 08:29:16PM +0000, Markus Weihs wrote:
> to get coloured output on a linux terminal, you can do something like
>
> echo -e "\033[31m This is now red"
>
> How can I do this with OCaml? The following doesn't work
>
> print_string "\033[31m blabla"
This is my biggest "pet peeve" about OCaml. It uses *decimal* escapes
for characters, not octal like everywhere else in the UNIX and
C-influenced universe.
So you want
print_string "\027[31m blabla"
--
Eric Cooper e c c @ c m u . e d u
next prev parent reply other threads:[~2007-01-13 20:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-13 20:29 Markus Weihs
2007-01-13 20:52 ` [Caml-list] " Daniel de Rauglaudre
2007-01-13 21:05 ` Markus Weihs
2007-01-13 20:53 ` [Caml-list] " Vu Ngoc San
2007-01-13 20:56 ` Eric Cooper [this message]
2007-01-16 18:23 ` Florian Weimer
2007-01-21 17:11 ` Xavier Leroy
2007-01-13 20:56 ` Goulagman
2007-01-13 21:38 ` Philippe Wang
2007-01-13 22:45 ` Christophe TROESTLER
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070113205636.GB24042@localhost \
--to=ecc@cmu.edu \
--cc=caml-list@inria.fr \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).