From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9972 invoked from network); 4 Oct 2006 20:00:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 4 Oct 2006 20:00:51 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 86777 invoked from network); 4 Oct 2006 20:00:39 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Oct 2006 20:00:39 -0000 Received: (qmail 23673 invoked by alias); 4 Oct 2006 20:00:31 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10781 Received: (qmail 23661 invoked from network); 4 Oct 2006 20:00:30 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 4 Oct 2006 20:00:30 -0000 Received: (qmail 85669 invoked from network); 4 Oct 2006 20:00:30 -0000 Received: from lucien.blight.com (204.10.50.50) by a.mx.sunsite.dk with SMTP; 4 Oct 2006 20:00:28 -0000 Received: from lucien.blight.com (localhost [127.0.0.1]) by lucien.blight.com (0.0.0/0.0.0) with ESMTP id k94K0PU0004044 for ; Wed, 4 Oct 2006 15:00:25 -0500 Received: (from larold@localhost) by lucien.blight.com (0.0.0/0.0.0) id k94K0Pm5004042 for zsh-users@sunsite.dk; Wed, 4 Oct 2006 15:00:25 -0500 Date: Wed, 4 Oct 2006 15:00:25 -0500 From: "Larry P. Schrof" To: zsh-users@sunsite.dk Subject: Question on array processing. Message-ID: <20061004200025.GA3092@lucien.blight.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i There is a subscript flag, s: , (used with the 'w' flag) that allows you to index into a string as if it were an array, using as a separator for elements. Here's my question: I absolutely can NOT figure out how to get zsh to use a single colon (':') as a separator. No matter how I try to quote the second colon, zsh sees the second colon in the expression as the termination for the separator string. I'm tring to do something like: > str="these:are:some:words" > echo ${str[(ws:::)2]} zsh: bad math expression: operand expected at `::)2' I've also tried :":":, :\::, and :':': - none of those work. Is this a small flaw / hole in zsh's functionality? Thanks. - Larry