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: bash filename completion character bug


On Thu, 20 Jul 2006 06:31:18 -0600, Eric Blake 
   <ebb9@byu.net> 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/


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