Re: color prompts
On Wed, Jul 15, 1998 at 09:53:08AM -0500, Dave Jones wrote:
> I read in the Configuration HOWTO that RedHat & Slackware Linux can use
> Escape control codes to add color support (and some default settings;
> like LESS as a default pager) to the prompt line, see below:
> # put a real escape character instead of ^[. To do this:
> # emacs: ^Q ESC vi: ^V ESC joe: ` 0 2 7 jed: ` ESC
> # Remove `;1' if you don't like the `bold' attribute.
> PS1='$ESC[$COLOUR;37;1m$USER:$ESC[37;40;1m\w\$ '
> PS2="Continue> "
This only works on ANSI/VT100 terminals (and probably VT220, 320 etc too).
It may not work on others. It is safe enough if you know you will only
ever use those terminals, but some people like to write this sort of
thing in to software without being aware of the limitations.
Hamish Moffatt, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org
Latest Debian packages at ftp://ftp.rising.com.au/pub/hamish. PGP#EFA6B9D5
CCs of replies from mailing lists are welcome. http://hamish.home.ml.org
Unsubscribe? mail -s unsubscribe email@example.com < /dev/null