From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29526 invoked from network); 2 Mar 2005 05:29:05 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 2 Mar 2005 05:29:05 -0000 Received: (qmail 41072 invoked from network); 2 Mar 2005 05:28:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Mar 2005 05:28:59 -0000 Received: (qmail 2976 invoked by alias); 2 Mar 2005 05:28:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20906 Received: (qmail 2965 invoked from network); 2 Mar 2005 05:28:51 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 2 Mar 2005 05:28:51 -0000 Received: (qmail 40667 invoked from network); 2 Mar 2005 05:28:51 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 2 Mar 2005 05:28:46 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 5C4147004A; Wed, 2 Mar 2005 00:28:45 -0500 (EST) Date: Wed, 2 Mar 2005 00:28:45 -0500 From: Clint Adams To: zsh-workers@sunsite.dk Subject: [stew@vireo.org: Bug#295511: patch] Message-ID: <20050302052845.GA27771@scowler.net> Mail-Followup-To: zsh-workers@sunsite.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.5 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.5 Wayne, any thoughts? ----- Forwarded message from Mike O'Connor ----- Here is a patch that seems to fix this bug. What I have done is to alter the _make completion functions so that recursion in expanding variables is limited to only going 10 levels deep. -stew diff -ru zsh-4.2.4/Completion/Unix/Command/_make zsh-4.2.4-makecompletionfix/Completion/Unix/Command/_make --- zsh-4.2.4/Completion/Unix/Command/_make 2005-03-01 23:17:01.000000000 -0500 +++ zsh-4.2.4-makecompletionfix/Completion/Unix/Command/_make 2005-03-01 23:16:18.000000000 -0500 @@ -3,7 +3,10 @@ local prev="$words[CURRENT-1]" file expl tmp is_gnu dir incl expandVars() { - local open close var val tmp=$1 ret=$1 + local open close var val tmp=$2 ret=$2 + if (( $1 == 0 )); then + return + fi while :; do var=${tmp#*\$} if [[ $var != $tmp ]]; then @@ -37,7 +40,7 @@ case $var in ([[:alnum:]_]#) val=${(P)var} - val=$(expandVars $val) + val=$(expandVars $(($1 - 1)) $val) ret=${ret//\$$open$var$close/$val} ;; esac @@ -63,12 +66,12 @@ var=${input%%[ $TAB]#:=*} val=${input#*=} val=${val##[ $TAB]#} - val=$(expandVars $val) + val=$(expandVars 10 $val) eval $var=\$val ;; ([[:alnum:]][^$TAB:=]#:[^=]*) input=${input%%:*} - print $(expandVars $input) + print $(expandVars 10 $input) ;; ($incl *) local f=${input##$incl ##} @@ -76,7 +79,7 @@ f=${f#[\"<]} f=${f%[\">]} fi - f=$(expandVars $f) + f=$(expandVars 10 $f) case $f in (/*) ;; (*) f=$dir/$f ;; ----- End forwarded message -----