bug-bash
[Top][All Lists]
Advanced

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

Re: dabbrev-expand completions are sorted


From: Chet Ramey
Subject: Re: dabbrev-expand completions are sorted
Date: Thu, 16 Mar 2017 16:31:25 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

On 3/16/17 1:49 PM, Roee Bar wrote:
> There is no ambiguous in dabbrev-expand - it is well defined what the 
> completion should be: each key press cycles through the matches from most 
> recent to oldest match. This is different than TAB completion, where it is 
> possible to have several matches so it makes sense to display them. That is 
> also the dabbrev-expand behaviour in tcsh when ‘autolist’ (i.e. 
> 'show-all-if-ambiguous’ ) is set.

When show-all-if-ambiguous is set, readline displays the matches if
there is more than one possible completion. It doesn't matter which
completion function you're using; the behavior of the variable is consistent.

In bash's case, dabbrev-expand (which first appeared in bash-4.0) is built
on top of readline's menu completion function, and inherits its behavior.
That means that dabbrev-expand has always honored show-all-if-ambiguous,
since menu completion has honored it since before dabbrev-expand was
introduced. I'm reluctant to change it now.

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



reply via email to

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