delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/10/04/22:39:27

X-Spam-Check-By: sourceware.org
Message-ID: <45247062.9000603@byu.net>
Date: Wed, 04 Oct 2006 20:39:30 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com, bash-testers AT case DOT edu
Subject: Re: readline-5.2-1 prompt issue on cygwin
References: <announce DOT 4523B5DB DOT 8080709 AT byu DOT net> <Pine DOT GSO DOT 4 DOT 63 DOT 0610041002060 DOT 12019 AT access1 DOT cims DOT nyu DOT edu>
In-Reply-To: <Pine.GSO.4.63.0610041002060.12019@access1.cims.nyu.edu>
X-IsSubscribed: yes
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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Igor Peshansky on 10/4/2006 9:03 AM:
>> The upstream maintainer claims that this version fixes some prompt display
>> bugs when using non-printing escape sequences with a single-line prompt.
>> I have not verified this, but hope that this is the case.
> 
> FWIW, still doesn't work for me:
> 
> $ export PS1='[\[\e[32m\]\h\[\e[0m\]:\[\e[33m\]\w\[\e[0m\]] \[\]'
> [helios:~] cd /c^L
> [helios:~] cd /c/c
>            ^^^^^^^
> This is what's displayed.  Removing the '\[\]' at the end doesn't help.
> 	Igor

I am able to confirm this.  Using the above PS1 (the export is optional,
as it only has to be a shell variable rather than an environment
variable), and the xterm-unicode terminal as compiled for cygwin, along
with bash 3.1.17 and release candidate readline 5.2, I get the following
behavior when I type <c><d>< ></><c><^L>, where _ is the location of the
cursor:

$ PS1='[\[\e[32m\]\h\[\e[0m\]:\[\e[33m\]\w\[\e[0m\]] \[\]'
[LOUNGE:~] cd /c^L
[LOUNGE:~] cd /c/c_

Then following it by 6 backspaces (although I only typed five characters),
the display is stuck as:

[LOUNGE:~] cd_

Here, I then type <c><d>< ></><t><m><p><enter>, and get:
[LOUNGE:/tmp] ] _

I'm really at a loss as to how to go about debugging this, and don't know
whether the bug is in readline or in cygwin's terminal descriptions.  I
haven't yet built bash 3.2 for cygwin; is there any chance that bash-3.2
is using some readline hooks that bash 3.1 was not using, such that this
problem would go away?

This appears to be the same bug that I have been repeatedly reporting:
http://lists.gnu.org/archive/html/bug-bash/2006-05/msg00023.html
http://lists.gnu.org/archive/html/bug-bash/2006-03/msg00005.html
http://lists.gnu.org/archive/html/bug-bash/2005-07/msg00115.html

Any hints on what I should try from within a debugger?

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFJHBi84KuGfSFAYARAveKAKDTj+M/VIBJaY56sEBuaiAtxdPR6ACeJpO/
m145NSw794O2duQErRfqmwk=
=eBIY
-----END PGP SIGNATURE-----

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