This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: readline-5.2-1 prompt issue on cygwin

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

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

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

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

Eric Blake   
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]