[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Order of eshell/pcomplete completions when cycling
From: |
Tassilo Horn |
Subject: |
Re: Order of eshell/pcomplete completions when cycling |
Date: |
Fri, 10 Apr 2015 13:08:01 +0200 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli,
>> assuming I have the directories test, test1, test2, and test11, when
>> I do `cd tes<TAB>' in eshell, it'll cycle the possible completions in
>> the order test2/, test1/, test/, test11/.
>>
>> In a typical shell like ZSH or BASH, the order would be test/,
>> test1/, test11/, test2/, i.e., the completions come in lexicographic
>> order.
>>
>> Now I've found `pcomplete-compare-entry-function' which is
>> `string-lessp' by default and suggests alphabetic sorting. That
>> variable is set buffer-locally to `file-newer-than-file-p' in eshell
>> buffers, so it seems there sorting according to creation (or
>> modification?) time is intended which is a very weird default value,
>> IMHO.
>
> I think you want string-collate-lessp, not string-lessp. AFAIK,
> that's what the shells use.
Yes, you are right. Unfortunately, it seems the function used for
`eshell-cmpl-compare-entry-function' (which is the default value for
`pcomplete-compare-entry-function' in eshell buffers) has no effect on
the order in which completions are cycled when hitting TAB repeatedly.
Bye,
Tassilo
- Order of eshell/pcomplete completions when cycling, Tassilo Horn, 2015/04/09
- Re: Order of eshell/pcomplete completions when cycling, Eli Zaretskii, 2015/04/09
- Re: Order of eshell/pcomplete completions when cycling,
Tassilo Horn <=
- Re: Order of eshell/pcomplete completions when cycling, Eli Zaretskii, 2015/04/10
- Re: Order of eshell/pcomplete completions when cycling, Tassilo Horn, 2015/04/10
- Re: Order of eshell/pcomplete completions when cycling, Stefan Monnier, 2015/04/10
- Re: Order of eshell/pcomplete completions when cycling, Tassilo Horn, 2015/04/10
- Re: Order of eshell/pcomplete completions when cycling, Stefan Monnier, 2015/04/10