From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15760 invoked by alias); 8 Nov 2009 19:55:16 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27370 Received: (qmail 15328 invoked from network); 8 Nov 2009 19:55:14 -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=BAYES_00,UNPARSEABLE_RELAY autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at yahoo.fr does not designate permitted sender hosts) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.fr; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; b=a5V+WA97qCigQ/nVAK5Yji3vIAJguPUxtoOGqv6FDXl2xTgWbyGw1Y4t8BGEof4v/6MxpIApWCxXGGYlsH3JgOk9B6O9mlwe0QD2BgAKBDBrmQ8ZNairrruiJcsG9OYqVKwBtRdPDRolvYWWN1uAcHfLqt74B1SyqD8UL7QxRFY= ; X-Yahoo-SMTP: V1UR0WuswBDVD1eFhM33188Ir8ciBckz4W8ZMsAh X-YMail-OSG: HqrgzUMVM1mJh_AA5fCcKMSsVOAE8t3D0SRiA62PM0IXLXnnto2vFCoMVx2y8ame1NFzCS3DD2XbgxK1cjzOgsqcoBcNFXpEuUKTuBWuO.CM1fqnmRQ3t4seIXxpdbJXIdY5pcSfBOJxETrE09LLfPdkr1fbPG113JnHkIBH0BNZb4zZQnMfjpe9ZJIeGGGNV15hN_7Pe_TWY4U_gMXaG.Iu5Q_1GSRe7NiuoYILO9ejcjEbPSSf3sLW5JTIn7zxp10xIPWP5mCb4dzj3B.loZVsqRnb8NcFgYk- X-Yahoo-Newman-Property: ymail-3 Date: Sun, 8 Nov 2009 19:48:26 +0000 From: Stephane Chazelas To: Bart Schaefer Cc: Zsh-Workers Subject: Re: FEATURES description wrong line Message-ID: Mail-Followup-To: Bart Schaefer , Zsh-Workers References: <20091108114904.GA7063@finlandia.home.infodrom.org> <091108090815.ZM24393@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <091108090815.ZM24393@torch.brasslantern.com> User-Agent: Mutt/1.5.16 (2007-09-19) 2009-11-08 09:08:15 -0800, Bart Schaefer: > On Nov 8, 12:49pm, Maddi Kopfermann wrote: > } > } I read in "FEATURES" and found some wrong line: > } > } "ls *(om[2]) matches the two most recently modified files" > } > } I am very thankful that this FEATURE isn't there ;) > } Would confuse me very much :) > > Good catch, that matches the second-most-recently modified file. To get > the two most recently modified, you need *(om[1,2]) ... but that's not > exemplary enough if you ask me, because it makes it appear you have to > list all the indices. [...] By the way, what about having the empty string (or any sequence of white space) resolve to 0 in numeric context everywhere? We already have: $ echo $(()) 0 $ (()) || echo null null $ [ 0 -eq "" ] && echo yes yes $ a=; echo $(( a == 0 )) 1 AT&T ksh and pdksh have: $ a=1 pdksh -c 'echo ${a[]}' 1 zsh could have the same and also *(om[,2]) would be another way to get the 2 most recent files, what do you think? -- Stephane