From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2217 invoked from network); 13 May 2008 16:07:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) 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.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 13 May 2008 16:07:54 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 65210 invoked from network); 13 May 2008 16:07:50 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 May 2008 16:07:50 -0000 Received: (qmail 28273 invoked by alias); 13 May 2008 16:07:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25019 Received: (qmail 28249 invoked from network); 13 May 2008 16:07:46 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 13 May 2008 16:07:46 -0000 Received: from mail.o2.co.uk (vader.london.02.net [82.132.130.150]) by bifrost.dotsrc.org (Postfix) with ESMTP id 1871E80ED173 for ; Tue, 13 May 2008 18:07:39 +0200 (CEST) Received: from sc.homeunix.net (78.105.216.138) by mail.o2.co.uk (8.0.013.3) (authenticated as stephane.chazelas) id 480CEB8204A45D23; Tue, 13 May 2008 17:07:35 +0100 Received: from chazelas by sc.homeunix.net with local (Exim 4.69) (envelope-from ) id 1Jvx2N-0002uY-8z; Tue, 13 May 2008 17:07:35 +0100 Date: Tue, 13 May 2008 17:07:35 +0100 From: Stephane Chazelas To: Omari Norman Cc: zsh-workers@sunsite.dk Subject: Re: New completions for awk cut join sort - attached Message-ID: <20080513160735.GF5173@sc.homeunix.net> Mail-Followup-To: Omari Norman , zsh-workers@sunsite.dk References: <20080513155532.GA17790@cameron> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080513155532.GA17790@cameron> User-Agent: Mutt/1.5.16 (2007-09-19) X-Virus-Scanned: ClamAV 0.91.2/7110/Tue May 13 16:12:33 2008 on bifrost X-Virus-Status: Clean On Tue, May 13, 2008 at 11:55:32AM -0400, Omari Norman wrote: [...] > # completions for awk > # This only aims to complete POSIX awk options, as described in > # awk(P). Most awk implementations, such as gawk and mawk, will have > # additional options that this does not complete. Also, currently > # this completion does not allow everything that POSIX allows. For > # example, awk(P) states that the user may specify assignments > # without using the -v option; this does not support that. > # > # In addition, the "program text" completion is not perfect. For > # instance, type "awk -" and then hit tab. You will be presented > # both with the dashed options and with the "program text" option. > # Fixing this is beyond my current _arguments expertise--help > # appreciated. > > _arguments -S -s '-F[define input field separator to be an extended regular expression]:extended regular expression:' \ > '*-v[assign values to variables]:assignment:' \ > '(1)-f[program file]:program file:_files' \ > '1:program text:' \ > '*:input files:_files' [...] Note that the remaining arguments of awk can also be awk variable assignments or the special string "-" to specify stdin. regards, Stéphane