[Top][All Lists]

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

Re: Expand first before asking the question "Display all xxx possibiliti

From: Chet Ramey
Subject: Re: Expand first before asking the question "Display all xxx possibilities?"
Date: Thu, 6 Aug 2020 08:59:48 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 8/6/20 8:13 AM, Ilkka Virta wrote:
> On 5.8. 22:21, Chris Elvidge wrote:
>> On 05/08/2020 02:55 pm, Chet Ramey wrote:
>>> On 8/2/20 6:55 PM, 積丹尼 Dan Jacobson wrote:
>>>> how about doing the expansion first, so entering
>>>> $ zz /jidanni_backups/da<TAB> would then change into
>>  >> $ zz /jidanni_backups/dan_home_bkp with below it the question
>>  >> Display all 113 possibilities? (y or n)
>> What happens if you have:
>> dan_home-bkp, dan_home_nobkp, dan-home-bkp, dan-nohome-bkp,
>> dan_nohome-bkp (etc.) in /jidanni_backups/?
>> Which do you choose for the first expansion?
> I think they meant the case where all the files matching the given
> beginning have a longer prefix in common. The shell expands that prefix to
> the command line after asking to show all possibilities.

Only if you set the "show-all-if-ambiguous" readline variable explicitly
asking for this behavior. Readline's default behavior is to complete up to
the longest common prefix, then, on the next completion attempt, to note
that there weren't any additional changes to the buffer and ask if the user
wants to see the alternatives. Dan wants a change in the behavior that
variable enables.

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

reply via email to

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