X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Chris Croughton Subject: Re: bash filename completion character bug Date: Thu, 20 Jul 2006 20:58:06 +0100 Lines: 51 Message-ID: References: <44BF7796 DOT 4000802 AT byu DOT net> Reply-To: chris AT keristor DOT net User-Agent: slrn/0.9.7.4 (Linux) 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 On Thu, 20 Jul 2006 06:31:18 -0600, Eric Blake wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > According to Chris Croughton on 7/19/2006 10:48 PM: >> >> When I do filename completion with TAB I get an extra character on the >> name: >> >> ~$ ba[TAB] >> BA31INSTALL.LOG basename.exe bash.exe bashdb >> batt.dll >> banner.exe basesrv.dll bashbug batmeter.dll >> ~$ baa >> >> This seems to be purely a visual artefact, the actual characters in the >> input buffer are still correct but all of the editing is then wrong (so >> doing backspace twice in the above will leave the 'b' visible but not in >> the input buffer). > > This is a repeatedly-reported bug in readline 5.0/5.1's handling of > single-line prompts in the face of invisible characters when compiled for > multi-byte handling. Aha! I thought I'd ruled out readline because a load of other programs also use it without problems, but they don't have escape code prompts (which I use for setting the title bar to the current directory, as in the default bash prompts but on a single line). Gah. > I don't know the root cause, but the upstream > maintainer, Chet Ramey, claims that he has fixed it for readline 5.2. He > currently has a beta test underway, and I am hoping to package readline > 5.2 in the near future to see if his claim holds any water (he had also > claimed to fix it for 5.1, but obviously hadn't). OK, thanks. > In the meantime, workarounds are to change your PS1 to be multi-line, give > up color sequences, recompile readline to avoid multi-byte characters, or > live with it until at least the next release. Well, in the meantime I'll use zsh instead of bash on systems where it matters, and leave bash to scripts. Which is what I do on my *ix systems anyway, mostly (except the uVAX which took several hours to compile bash and would take at least a day to compile zsh if it even succeeded). It's just a pain trying to get my zsh scripts over to the Cygwin machines and then retailored for the different environment... Chris C -- 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/