This is the mail archive of the
mailing list for the Cygwin project.
Re: colours for info & man displays
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin at cygwin dot com
- Date: Fri, 07 Nov 2003 07:01:04 -0800
- Subject: Re: colours for info & man displays
- Organization: My own little world...
- References: <firstname.lastname@example.org>
> I always use a Win32 Console for CYGWIN with light turquiose set as
> background colour and black for text. This is setup via Win32 Console
> The Cygwin prompt color is green. My problem is that in INFO or MAN
> pages this green is practically invisible against the highlight colour
> used for the status bar
> q1) Where is PS1 set?
> q2) How can I change the green colour?
It's set in /etc/profile by default. Also, the default setting is
Note the line breaks -- you could achieve the same affect with \n
without spanning multiple lines. The first segment of the prompt does
not actually display anything. "\033]0;\w\007" is the code to set the
rxvt window title. \w is replaced by the current working directory, but
you could put anything there you want. The \[ and \] sequences tell
bash that the enclosed characters are non-printing, i.e. control
characters. This is so that bash doesn't get confused as to which
column the cursor is on. The part that actually sets the color is done
by "\033[32m". 32 means green, and the general form of this command is
"\033[#;#...#;m" where each # specifies an attribute. See for example
<http://www.bluesock.org/~willg/dev/ansi.html>. Note also that \033 is
the octal representation of the ESC character. You can also use \e.
Finally, there is the list of escape sequences that bash substitutes,
i.e. \w, \u, etc. A full list can be found here:
That should be all you need to fiddle around with the colors and/or
layout. For example, my prompt is currently:
export PS1='\[\e]0;\l \w\007\n($?) \t \[\e[36m\]\l \[\e[32m\]\u@\h
(That should be all on one line.) I like having the tty number in the
window title, as well as the timestamp and return value of the previous
command displayed at the prompt.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html