From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9843 invoked from network); 9 Dec 2007 01:36:45 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) 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.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Dec 2007 01:36:45 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 23896 invoked from network); 9 Dec 2007 01:36:39 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Dec 2007 01:36:39 -0000 Received: (qmail 13571 invoked by alias); 9 Dec 2007 01:36:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24192 Received: (qmail 13552 invoked from network); 9 Dec 2007 01:36:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Dec 2007 01:36:34 -0000 Received: (qmail 23706 invoked from network); 9 Dec 2007 01:36:34 -0000 Received: from vinc17.pck.nerim.net (HELO prunille.vinc17.org) (213.41.242.187) by a.mx.sunsite.dk with SMTP; 9 Dec 2007 01:36:27 -0000 Received: by prunille.vinc17.org (Postfix, from userid 501) id 523C31C5597F; Sun, 9 Dec 2007 02:36:27 +0100 (CET) Date: Sun, 9 Dec 2007 02:36:27 +0100 From: Vincent Lefevre To: 455070@bugs.debian.org, zsh-workers@sunsite.dk Subject: Re: Bug#455070: zsh: make completion: please add support for -include Message-ID: <20071209013627.GD132@prunille.vinc17.org> Mail-Followup-To: 455070@bugs.debian.org, zsh-workers@sunsite.dk References: <20071208195817.GA26694@vin.lip.ens-lyon.fr> <20071208210725.GA25946@scowler.net> <20071209011247.GB132@prunille.vinc17.org> <20071209012657.GC132@prunille.vinc17.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20071209012657.GC132@prunille.vinc17.org> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.17-vl-r19795 (2007-12-07) --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2007-12-09 02:26:58 +0100, Vincent Lefevre wrote: > prunille:~> incl="(-|)include" > prunille:~> echo ${input##(-|)include ##} > foo > prunille:~> echo ${input##$incl ##} > include foo But: prunille:~> echo ${input##${~incl} ##} foo The attached patch works, but I'm not sure it is correct. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon) --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="_make.diff" --- functions/Completion/Unix/_make 2007-12-09 02:08:38.000000000 +0100 +++ share/zsh/site-functions/_make 2007-12-09 02:32:49.000000000 +0100 @@ -81,8 +81,8 @@ input=${input%%:*} print $(expandVars 10 $input) ;; - ($incl *) - local f=${input##$incl ##} + (${~incl} *) + local f=${input##${~incl} ##} if [[ $incl = '.include' ]]; then f=${f#[\"<]} f=${f%[\">]} @@ -125,7 +125,7 @@ _pick_variant -r is_gnu gnu=GNU unix -v -f if [[ $is_gnu = gnu ]]; then - incl=include + incl="(-|)include" else incl=.include fi --HlL+5n6rz5pIUxbD--