[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: completion gobbles partial match string
From: |
Chet Ramey |
Subject: |
Re: completion gobbles partial match string |
Date: |
Mon, 03 May 2010 22:09:03 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1 |
On 5/3/10 9:23 PM, Chet Ramey wrote:
> On 5/1/10 8:46 PM, jidanni@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 chet@case.edu http://cnswww.cns.cwru.edu/~chet/