bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A programmable completoin bug?


From: Chet Ramey
Subject: Re: A programmable completoin bug?
Date: Tue, 06 Dec 2011 22:55:23 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 12/5/11 12:15 AM, Clark J. Wang wrote:
> On Mon, Dec 5, 2011 at 11:42, Chet Ramey <chet.ramey@case.edu
> <mailto:chet.ramey@case.edu>> wrote:
> 
>     On 12/4/11 10:26 PM, Clark J. Wang wrote:
>     > On Mon, Dec 5, 2011 at 11:10, Chet Ramey <chet.ramey@case.edu
>     <mailto:chet.ramey@case.edu>
>     > <mailto:chet.ramey@case.edu <mailto:chet.ramey@case.edu>>> wrote:
>     >
>     >
>     >     I still can't reproduce it on Mac OS X or RHEL 5.7:
>     >
>     >
>     > It's weird. :) Any other settings can affect this? What can I do to
>     debug more?
> 
>     Well, if it were me, I'd fire up gdb and set a breakpoint in
>     pcomplete.c:gen_shell_function_matches.  I wonder if you've got something
>     filtering out or ignoring those matches.
> 
>     Chet
>     --
>     ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                     ``Ars longa, vita brevis'' - Hippocrates
>     Chet Ramey, ITS, CWRU    chet@case.edu <mailto:chet@case.edu>  
>      http://cnswww.cns.cwru.edu/~chet/ <http://cnswww.cns.cwru.edu/%7Echet/>
> 
> 
> After more investigation I found that it's caused by "set
> completion-ignore-case on". After turning completion-ignore-case off it
> works fine. You can give it a try.

Yes, it's the case-ignoring code.  It looks like you're the first person
to hit this since the code went in over ten years ago.  The original code
doesn't handle the case where the text the user typed is longer than the
replacement text well.

The attached patch fixes the issue.  It will be in the next bash release.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/

Attachment: completion-case-match.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]