On 5/3/10 9:23 PM, Chet Ramey wrote:
> On 5/1/10 8:46 PM, jida...@jidanni.org wrote:
> 
>> set show-all-if-ambiguous on
> 
> This is the problem.  I'll take a look.

This is an interesting issue.  The problem is as I described: globbing can
result in multiple matches without any common prefix, which causes the
glob pattern itself to be replaced with the common prefix (nothing).

It works for tab without show-all-if-ambiguous set because the bash glob
completion function clears the match list if there are multiple matches.
You'd like not to do this for show-all-if-ambiguous, though.

I'm going to experiment with a small change: if show-all-if-ambiguous or
show-all-if-unmodified are set, and the common match prefix is shorter
than the text being completed, readline will inhibit inserting the match.
The guess is that replacing text with a shorter match will not be wanted.

Should readline do this only if there are multiple matches?

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


Reply via email to