Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [lunz@xxxxxxxxxxxx: Bug#279417: zsh: "make" completion issues "bad option" warnings for some Makefiles]
- X-seq: zsh-workers 20551
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Clint Adams <clint@xxxxxxx>
- Subject: Re: [lunz@xxxxxxxxxxxx: Bug#279417: zsh: "make" completion issues "bad option" warnings for some Makefiles]
- Date: Wed, 10 Nov 2004 09:27:18 -0800
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <20041102231304.GA15509@xxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20041102231304.GA15509@xxxxxxxxxxx>
On Tue, Nov 02, 2004 at 06:13:04PM -0500, Clint Adams wrote:
> This prevents the warnings, though I don't know if there's a deeper
> problem occurring here.
Your fix looks right to me for the root of the problem.
One other potential parsing problem that occurred to me while looking at
this was that "$$" wasn't being interpreted properly.  The following
patch should make it better (though not 100% foolproof, it should
hopefully be adequate for our purposes).
--- Completion/Unix/Command/_make	2 Nov 2004 23:26:42 -0000	1.12
+++ Completion/Unix/Command/_make	10 Nov 2004 17:18:53 -0000
@@ -22,6 +22,10 @@ expandVars() {
 		close=''
 		var=${(s::)var[1]}
 		;;
+	    (\$*)
+		# avoid parsing second $ in $$
+		tmp=${tmp#\$}
+		continue
 	    (*)
 		continue
 		;;
@@ -38,7 +42,7 @@ expandVars() {
 		;;
 	    esac
 	else
-	    print -- $ret
+	    print -- ${ret//\$\$/\$}
 	    return
 	fi
     done
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author