How do I turn ANSI-terminal colourising off?
"Richard A. O'Keefe" <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
I'm running SWI Prolog version 6.5.0 on a Macintosh running OS X 10.7.5.
I'm doing this through a Terminal, using black text on a hospital green
background. XPCE is not involved, nor Emacs of any flavour. This is
just plain old terminal interaction.
?- [library(lists)]. <- all black
% library(pairs) compiled into pairs 0.00 sec, 22 clauses <- green on green
% library(lists) compiled into lists 0.00 sec, 122 clauses <- green on green
true. <- purple
Having the information lines come out in a moderately saturated
green on a slightly less saturated green background is as helpful,
and purple on green as horrible, as they sound.
It's sending
<ESC>[32m green stuff <NL>
<ESC>[0m<ESC>[32m green stuff <NL>
<ESC>[0m<ESC>[1m purple stuff.<ESC>[0m<NL>
I've just been looking in http://www.swi-prolog.org/pldoc/refman/
for some advice about this. The only mention of "terminal" I can find
is section 4.33 Terminal Control, which has nothing to say about it,
and as for "Colour", it isn't there at all (even under Merkin speling).
Section 4.36, User Top-Level Manipulation, is also silent.
My despairing eye lighted on B.10, Readline Interaction, but there's
nothing about colourising there either. Using the search box to look
for "terminal" or "colour" also got me nowhere.
(By the way, Section B.2, Global Cuts, seems to be describing what have
long been known as >ancestral< cuts, or have I misunderstood? That's
what the undocumented Quintus operation was called, following Prologs
that did document something of the sort.)
Whatever the default colours are, they should be chosen to *contrast*
with the user's Terminal settings, and if it is impractical to detect
that, the best default is no colouring.