zsh-workers
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.org>
To: 455070@bugs.debian.org, zsh-workers@sunsite.dk
Subject: Re: Bug#455070: zsh: make completion: please add support for -include
Date: Sun, 9 Dec 2007 02:36:27 +0100	[thread overview]
Message-ID: <20071209013627.GD132@prunille.vinc17.org> (raw)
In-Reply-To: <20071209012657.GC132@prunille.vinc17.org>

[-- Attachment #1: Type: text/plain, Size: 515 bytes --]

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 <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

[-- Attachment #2: _make.diff --]
[-- Type: text/plain, Size: 566 bytes --]

--- 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

      reply	other threads:[~2007-12-09  1:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20071208195817.GA26694@vin.lip.ens-lyon.fr>
2007-12-08 21:07 ` Clint Adams
2007-12-09  1:12   ` Vincent Lefevre
2007-12-09  1:26     ` Vincent Lefevre
2007-12-09  1:36       ` Vincent Lefevre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071209013627.GD132@prunille.vinc17.org \
    --to=vincent@vinc17.org \
    --cc=455070@bugs.debian.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).