Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3FABB3B0.C44942FD@dessent.net> Date: Fri, 07 Nov 2003 07:01:04 -0800 From: Brian Dessent Organization: My own little world... X-Accept-Language: en,en-US MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: colours for info & man displays References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.linuxsv3.net X-AntiAbuse: Original Domain - cygwin.com X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - dessent.net Note-from-DJ: This may be spam zzapper wrote: > 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 > properties. > > 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 > > PS1=\[\033]0;\w\007 > > questions) > > 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 actually: export PS1='\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ' 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 . 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 \[\e[33m\]\w\[\e[0m\]\n$ ' (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. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/