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

This bug is insidious, as there is more than one wrong string printed to
the display.  For example, this screenshot shows that the original prompt
doubles the last prompt character ($), but after tab completion has
displayed a list, it doubles the first user-character (a).  From there,
using the arrow keys to go back, then forward in history, corrects the
display:

$ PS1='\[\e]0;1\a\]$'
$$a[TAB]
a/                     am4tPD2876/            atrace.dll
a2p.exe                amcompat.tlb           attrib.exe
...
alrsvc.dll             atobm.exe
$aa[UP]
$aPS1='\[\e]0;1\a\]$'[DOWN]
$a[UP]
$PS1='\[\e]0;1\a\]$'

Also, someone on the cygwin mailing list suggested that a workaround is to
fake bash into thinking that the last invisible character is the last
prompt character:

PS1='\[\e]0;1\a\]$\[\]'

This solves the problem of the initial prompt, but not the display after
tab-completion.  And it points out a flaw in the readline expand_prompt()
logic for letting a zero-length \[\] invisible character marker pair
change the *lip parameter to an index of a non-invisible character.

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

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC1l2m84KuGfSFAYARAjovAJ9yhImh8VspYSn6+WClv/2XmRQnDQCglY71
NJMZ0WIZpsjE8ziJk1zOrwo=
=3wfB
-----END PGP SIGNATURE-----


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to