delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/07/17:34:49

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
From: ericblake AT comcast DOT net (Eric Blake)
To: "Peter D. Stout" <pds AT edgedynamics DOT com>, cygwin AT cygwin DOT com
Subject: Re: Bash 2.05 vs. 3.0 Prompt Behavior
Date: Thu, 07 Jul 2005 20:58:57 +0000
Message-Id: <070720052058.25789.42CD9791000BFF71000064BD22007601800A050E040D0C079D0A@comcast.net>
X-Authenticated-Sender: ZXJpY2JsYWtlQGNvbWNhc3QubmV0

> I updated my Cygwin installation this morning and picked up the new
> version of Bash (3.0-7).  When I started a new shell (running under
> rxvt) I was suprised to see that my prompt displayed differently than
> before the upgrade.  I use the following prompt
> 
>     PS1='\[\e]0;${WINDOW_TITLE}\u@\h \w\a\]\u@\h\$ '
> 
> The difference is the display of the portion that is not put in the
> title bar, with Bash 2.05 the prompt was (ignoring the tick marks, which
> are only included to the trailing whitespace) 'pds AT whangarei$ ', while
> with Bash 3.0 the prompt is 'pds AT whangarei$  '.  Note the extra space at
> the end with 3.0.  If I remove the space, the dollar sign is doubled,
> i.e. 'pds AT whangarei$$', if I replace the last space in the PS1 value
> with someother character, then that character is doubled.
> 
> I do not see this behavior if I use the default value of PS1 from
> /etc/profile.
> 

I can confirm the behavior, and I don't see anything wrong with your
prompt string (it correctly uses \[ and \]).  I'll have to investigate
further.  Several of the official upstream patches to bash have dealt
with prompt issues, though, so it may be an upstream bug.

--
Eric Blake
cygwin bash maintainer



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