X-Spam-Check-By: sourceware.org Message-ID: <43E7506C.20208@byu.net> Date: Mon, 06 Feb 2006 06:34:36 -0700 From: Eric Blake User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 CC: cygwin AT cygwin DOT com Subject: Re: Prompt issue within cygwin References: <43D635D5 DOT 9070204 AT byu DOT net> In-Reply-To: <43D635D5.9070204@byu.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 Eric Blake on 1/24/2006 7:12 AM: > > Shoot - the bug is still not fixed upstream; I reproduced it with > bash-3.1-1, readline-5.1-1, and rxvt-2.7.10-6. One of these days, I hope > to be able to sit down and figure out where readline is going wrong (it is > either a readline bug, or a bug in the terminfo database), but it is > painful to debug. > > >>>There is a prompt bug in bash that causes it to miscount the number of >>>displayed characters. One workaround was to append '\[\]' to PS1. Also, >>>a good habit to get into is to use single quotes in the shell when some >>>value contains backslashes. > > > Unfortunately, appending \[\] to PS1 no longer works with readline-5.1, > since upstream "fixed" readline to recognize that an empty non-printing > sequence has no effect on the location of the last non-printing character. > However, I think I might be able to recussitate my readline-5.0 hack that > forcefully treats a single-line prompt with non-printing characters as > though it had a \[\] appended (and I hope I can make it work at a lower > level then where empty \[\] is stripped from PS1). It may be a while, but > I plan on providing readline-5.1-2 that works around this nasty prompt bug > as soon as I can. Chet Ramey, the upstream readline maintainer, FINALLY admitted that his routines have display bugs when readline is compiled with multi-byte support, and when a single-line prompt contains invisible characters. The problem stems from the fact that there is no reliable way to determine which column the cursor is currently in, so readline makes some assumptions that the prompt always starts in column 0 (which is not always valid): http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00018.html Hopefully Chet holds true to his promise and makes readline 5.2 better at this (although given the history of his past releases, it will be more than a year away; and he doesn't post his development version control system online, so the rest of the world is stuck waiting). - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----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 iD8DBQFD51Bs84KuGfSFAYARAiSRAKCBFofaa8FV/jyN8W4PKq3AgQgfmQCgkc31 Majon+acNYsS90u8ox38rG0= =Grxu -----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/