From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 661 invoked from network); 6 Jul 2007 12:24:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) 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.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 Jul 2007 12:24:32 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 29542 invoked from network); 6 Jul 2007 12:24:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Jul 2007 12:24:26 -0000 Received: (qmail 24883 invoked by alias); 6 Jul 2007 12:24:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23659 Received: (qmail 24874 invoked from network); 6 Jul 2007 12:24:22 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 6 Jul 2007 12:24:22 -0000 Received: (qmail 29236 invoked from network); 6 Jul 2007 12:24:22 -0000 Received: from vinc17.pck.nerim.net (HELO prunille.vinc17.org) (213.41.242.187) by a.mx.sunsite.dk with SMTP; 6 Jul 2007 12:24:17 -0000 Received: by prunille.vinc17.org (Postfix, from userid 501) id C893916C7D18; Fri, 6 Jul 2007 14:24:15 +0200 (CEST) Date: Fri, 6 Jul 2007 14:24:15 +0200 From: Vincent Lefevre To: zsh-workers@sunsite.dk Subject: reverse numeric sorting does not work Message-ID: <20070706122415.GG18533@prunille.vinc17.org> Mail-Followup-To: zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.16-vl-r17763 (2007-06-14) Hi, Reverse numeric sorting doesn't seem to work: prunille% echo $ZSH_VERSION 4.3.4 prunille% foo=(a6 a117 a17 b6 b117 b17) prunille% echo ${(n)foo} a6 a17 a117 b6 b17 b117 prunille% echo ${(On)foo} b6 b17 b117 a6 a17 a117 instead of b117 b17 b6 a117 a17 a6 Also the man page is ambiguous: Are the numbers (nonnegative) integer or floating-point numbers? It also says: "if the first differing characters of two test strings are not digits, sorting is lexical." then "Trailing non-digits are not sorted; the order of `2foo' and `2bar' is not defined." But on this example, the first differing characters are not digits, so that the sorting should be lexical, hence defined! -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)