Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Who is sorting my completion results?
- X-seq: zsh-workers 25557
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: Who is sorting my completion results?
- Date: Sat, 30 Aug 2008 13:16:07 +0100
- In-reply-to: Message from "Mikael Magnusson" <mikachu@xxxxxxxxx> of "Sat, 30 Aug 2008 14:02:14 +0200." <237967ef0808300502g4381ed95if84ca7dd18b9445d@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
"Mikael Magnusson" wrote:
> I'm trying to add reflog completion for git (nevermind what that is if
> you don't know :), they look like foo@{1}, foo@{2}, etc. git reflog
> gives an already sorted list of reflog entries, but when I try my
> completion in the shell, they are re-sorted as foo@{1}, foo@{10},
> foo@{100}, foo@{2}, etc. Who and why is this list resorted by?
> (+grammar).
Sorting or not sorting is done by whether you pass the option "-J group"
or "-V group" to compadd. In your case it looks like the right thing to
do is to pass the option "-V" (only) to _wanted, which will construct an
appropriate argument list for compadd.
Completion/Zsh/Type/_directory_stack was the simplest example I noticed
of this happening.
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author