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: <4243C536.43CBA6C4@dessent.net> Date: Fri, 25 Mar 2005 00:00:54 -0800 From: Brian Dessent Organization: My own little world... MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: rxvt problem: Prompt doesn't look very nice References: <4243160C DOT 7040503 AT buddydog DOT org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mikael wrote: > Thanks Michael. I am using the CVS-version (dated early febraury) of Emacs. > I removed the lines I added to my .bashrc and added what you showed to my > .emacs. Now my bash shell inside emacs looks nice (and in color), but it's > not perfect. Here it is: > > ]0;c:/cygwin/home/mikael/coding/Win32/show_styles/src > mikael AT mindcooler c:/cygwin/home/mikael/coding/Win32/show_styles/src > $ > > The first line doesn't look so good and it's basically repeating what's in > the second line (the path). The first line above of PS1 is an escape sequence that tells the terminal to change the window title to the given string. Emacs apparently does not support that escape sequence, so you'll have to modify your prompt. The Cygwin default is PS1='\[\033]0;\w\007\n\033[32m\]\u@\h \[\033[33m\w\033[0m\]\n$ ' The part that sets the window title is "\033]0;\w\007", so you would want PS1='\n\[\033[32m\]\u@\h \[\033[33m\w\033[0m\]\n$ ' Note that '\[' and '\]' are pseudo-escape sequences that tell bash that the enclosed characters represent an escape sequence that the terminal will interpret and not print. They are used so that bash will know to not include those characters in calculating the cursor position. If you want to change the colors, the number N in "\033[Nm" is what to modify. See google or for more details. 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/