[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Colours in Terminal.app
From: |
Pascal Bourguignon |
Subject: |
Re: Colours in Terminal.app |
Date: |
Wed, 9 Oct 2002 00:26:16 +0200 (CEST) |
> From: Andreas Heppel <aheppel@web.de>
> Date: Tue, 08 Oct 2002 16:48:58 +0200
>
> On 2002-10-07 15:22:38 -0700 Gregory Casamento <greg_casamento@yahoo.com>
> wrote:
>
> > Andreas,
> >
> > I may be speaking a little out of turn here, but I believe that Alex had
> > said
> > that the tools used to change colors on the command line in an X terminal
> > program (wterm, xterm) would work for Terminal.app since the code from
> > console.c (the standard GNU/Linux console) was used to implement it.
> >
> Gregory,
> which command line tools are you referring to?
>
> Andreas
I don't know. On xterm, I just use:
#
# ANSI terminal codes:
#
export CYAN_BACK="[46m"
export MAGENTA_BACK="[45m"
export BLUE_BACK="[44m"
export YELLOW_BACK="[43m"
export GREEN_BACK="[42m"
export RED_BACK="[41m"
export BLACK_BACK="[40m"
export WHITE_BACK="[47m"
export WHITE="[37m"
export CYAN="[36m"
export MAGENTA="[35m"
export BLUE="[34m"
export YELLOW="[33m"
export GREEN="[32m"
export RED="[31m"
export BLACK="[30m"
export NO_INVERT="[27m"
export NO_BLINK="[25m"
export NO_UNDERLINE="[24m"
export NO_BOLD="[22m"
export INVERT="[7m"
export BLINK="[5m"
export UNDERLINE="[4m"
export BOLD="[1m"
export NORMAL="[0m"
export GOTO_HOME=""
export CLEAR_HOME=""
and then:
echo ${CYAN_BACK}${RED}${BOLD}Hello World
But if there is a tool that looks up these code in a termcap file or
wherever and is able to do it portably on any kind of terminal,
better.
--
__Pascal_Bourguignon__ http://www.informatimago.com/
----------------------------------------------------------------------
The name is Baud,...... James Baud.