From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12932 invoked from network); 6 May 2005 12:48:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 May 2005 12:48:44 -0000 Received: (qmail 10460 invoked from network); 6 May 2005 12:48:37 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 May 2005 12:48:37 -0000 Received: (qmail 491 invoked by alias); 6 May 2005 12:48:31 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8781 Received: (qmail 480 invoked from network); 6 May 2005 12:48:31 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 6 May 2005 12:48:31 -0000 Received: (qmail 9497 invoked from network); 6 May 2005 12:48:31 -0000 Received: from happygiraffe.net (81.6.215.59) by a.mx.sunsite.dk with SMTP; 6 May 2005 12:48:27 -0000 Received: from localhost (localhost.happygiraffe.net [127.0.0.1]) by happygiraffe.net (Postfix) with ESMTP id 28AC0B835 for ; Fri, 6 May 2005 13:48:26 +0100 (BST) Received: from happygiraffe.net ([127.0.0.1]) by localhost (ppe.happygiraffe.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 80866-05 for ; Fri, 6 May 2005 13:48:17 +0100 (BST) Received: by happygiraffe.net (Postfix, from userid 1001) id 5ADC9B831; Fri, 6 May 2005 13:48:17 +0100 (BST) Date: Fri, 6 May 2005 13:48:17 +0100 To: zsh-users@sunsite.dk Subject: param expansion flags Message-ID: <20050506124817.GA81248@ppe.happygiraffe.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i From: dom@happygiraffe.net (Dominic Mitchell) X-Virus-Scanned: amavisd-new at happygiraffe.net X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 I'm trying to write a completion file rake (a make like thing for ruby). You can get a list of targets like this: % rake -sT rake apidoc # Build the apidoc HTML Files rake appdoc # Build the appdoc HTML Files rake clear_logs # Clears all *.log files in log/ And I'm trying to get that lot into an array parameter that looks like this: targets=( 'apidoc[Build the apidoc HTML Files]' 'appdoc[Build the appdoc HTML Files]' 'clear_logs[Clears all *.log files in log/]' ) I've gotten part of the way there, but I can't figure out the rest. So far, I've gotten it to split out the lines, remove "rake " from the front and start putting the initial square bracket in. % arr=( ${${${(f)~~"$(rake -sT)"}#rake }/ *# /[} ) Can anyone offer me some advice? -Dom