From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27359 invoked from network); 30 Aug 2008 12:16:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Aug 2008 12:16:35 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 16844 invoked from network); 30 Aug 2008 12:16:30 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Aug 2008 12:16:30 -0000 Received: (qmail 8468 invoked by alias); 30 Aug 2008 12:16:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25557 Received: (qmail 8457 invoked from network); 30 Aug 2008 12:16:22 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 30 Aug 2008 12:16:22 -0000 Received: from mtaout01-winn.ispmail.ntl.com (mtaout01-winn.ispmail.ntl.com [81.103.221.47]) by bifrost.dotsrc.org (Postfix) with ESMTP id 3FEB98030848 for ; Sat, 30 Aug 2008 14:16:19 +0200 (CEST) Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080830121618.KBSX777.mtaout01-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Sat, 30 Aug 2008 13:16:18 +0100 Received: from pws-pc.ntlworld.com ([81.107.43.40]) by aamtaout03-winn.ispmail.ntl.com with ESMTP id <20080830121615.DEEG29597.aamtaout03-winn.ispmail.ntl.com@pws-pc.ntlworld.com> for ; Sat, 30 Aug 2008 13:16:15 +0100 Received: from pws-pc (pws-pc [127.0.0.1]) by pws-pc.ntlworld.com (8.14.2/8.14.2) with ESMTP id m7UCG71N003873 for ; Sat, 30 Aug 2008 13:16:07 +0100 Message-Id: <200808301216.m7UCG71N003873@pws-pc.ntlworld.com> From: Peter Stephenson To: zsh-workers Subject: Re: Who is sorting my completion results? In-Reply-To: Message from "Mikael Magnusson" of "Sat, 30 Aug 2008 14:02:14 +0200." <237967ef0808300502g4381ed95if84ca7dd18b9445d@mail.gmail.com> Date: Sat, 30 Aug 2008 13:16:07 +0100 X-Virus-Scanned: ClamAV 0.92.1/8120/Sat Aug 30 05:43:49 2008 on bifrost X-Virus-Status: Clean "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 Web page now at http://homepage.ntlworld.com/p.w.stephenson/