delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/25/04:51:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
From: "Mikael" <mindcooler AT gmail DOT com>
Subject: Re: rxvt problem: Prompt doesn't look very nice
Date: Fri, 25 Mar 2005 10:51:20 +0100
Lines: 50
Message-ID: <d20mtv$enu$1@sea.gmane.org>
References: <d1v41l$kii$1 AT sea DOT gmane DOT org> <4243160C DOT 7040503 AT buddydog DOT org> <d1v5e8$p5i$1 AT sea DOT gmane DOT org> <loom DOT 20050325T001858-298 AT post DOT gmane DOT org> <d20e6q$rk5$1 AT sea DOT gmane DOT org> <4243C536 DOT 43CBA6C4 AT dessent DOT net>
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: 180.184.204.213.sol.worldonline.se
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-RFC2646: Format=Flowed; Original
X-Gmane-MailScanner: Found to be clean
X-Gmane-MailScanner: Found to be clean
X-Gmane-MailScanner-SpamScore: sssss
X-MailScanner-From: goc-cygwin AT m DOT gmane DOT org
X-MailScanner-To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

"Brian Dessent" wrote:
> 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
> <http://www.dee.ufcg.edu.br/~rrbrandt/tools/ansi.html> for more details.
>
> Brian
>

Very nice Brian! Now it looks great! Thanks alot everyone for helping me 
out...now my list of outstanding issues, related or semi-related, to Cygwin 
got shorter!

/ M 




--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019