From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28852 invoked from network); 21 Mar 2004 03:54:35 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 21 Mar 2004 03:54:35 -0000 Received: (qmail 6927 invoked by alias); 21 Mar 2004 03:54:23 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7213 Received: (qmail 6885 invoked from network); 21 Mar 2004 03:54:23 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 21 Mar 2004 03:54:23 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [199.67.51.101] by sunsite.dk (MessageWall 1.0.8) with SMTP; 21 Mar 2004 3:54:22 -0000 Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i2L3sLOe017032; Sat, 20 Mar 2004 21:54:21 -0600 (CST) (envelope-from dan) Date: Sat, 20 Mar 2004 21:54:21 -0600 From: Dan Nelson To: Clint Adams , Zsh Users Subject: Re: How to generate a list of numbers without 'seq'? Message-ID: <20040321035420.GB2097@dan.emsphone.com> References: <20040318205201.GA1228@DervishD> <20040318211223.GA1543@scowler.net> <20040319095840.GD1228@DervishD> <20040319163425.GF99558@dan.emsphone.com> <20040320100000.GA302@DervishD> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040320100000.GA302@DervishD> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i In the last episode (Mar 20), DervishD said: > Dan Nelson dixit: > > > > print -l {0..10} > > > This is more similar to the solution I was trying using , > > > which doesn't seem to work if it cannot be expanded :( But IIRC, I've > > > used syntax to generate list of numbers, but I don't remember > > > how, when, etc. > > is pattern matching, so it only matches existing filenames; > > Is there a way of making it work in string environment or > something like that (a mechanism similar to the use of globbing flags > in pattern matching at parameter expansion)? It should work any time zsh does pattern matching: $ [[ 4 == <1-5> ]] && echo yes || echo no yes $ [[ 6 == <1-5> ]] && echo yes || echo no no including case statements and ${var%%pattern} searches. -- Dan Nelson dnelson@allantgroup.com