From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23199 invoked by alias); 27 Apr 2011 09:03:16 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29084 Received: (qmail 23790 invoked from network); 27 Apr 2011 09:03:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.215.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=5hpMUxzESWfJS23uA8Z0EToac3yRnKOMbL61q97WKM0=; b=fdPakKNZc6G8HNqdqzPSl59EzUAlgCzI72LoGKSY6ez31AWwKyFnRYLevnYiwX9lz1 e9+2jnAX3LgyUFsBTdDv9EuGv1+APhGPFxSorsFrXHzcGFDGrmgaiSUaJh7w2rvj5w3t lnhNr8JnVDZYg1KFqthheLJDkeBQ8ShPhJ38U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=e+CpkIaeFlMe+WQLgwRIIVzaCrb/4+ZctQsCbFudoB4dcPXpa6iKCyh9iV5QnyuEGh 6YBm+oVI6O3weidVCrPZpaFnavpAYdlG9eD9Y3s3zMkMYvXjpH2Kn9OxKhDjoypfr+4v lmub/La+IAeDJXwPm5cjNO5jSClXMYyQRkyV4= MIME-Version: 1.0 In-Reply-To: References: From: =?UTF-8?B?SsOpcsOpbWllIFJvcXVldA==?= Date: Wed, 27 Apr 2011 11:02:54 +0200 Message-ID: Subject: Re: zle messes up 'words' variable? To: zsh-workers@zsh.org Cc: Felipe Contreras Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, 2011/4/27 Felipe Contreras : > I'm trying the following: > --- > set_vars () > { > =C2=A0 =C2=A0 =C2=A0 =C2=A0cur=3D"foo" > =C2=A0 =C2=A0 =C2=A0 =C2=A0words=3D"foo" > =C2=A0 =C2=A0 =C2=A0 =C2=A0cwords=3D"foo" > } > > _foo () > { > =C2=A0 =C2=A0 =C2=A0 =C2=A0local cur words cwords > =C2=A0 =C2=A0 =C2=A0 =C2=A0set_vars > > =C2=A0 =C2=A0 =C2=A0 =C2=A0echo "cur=3D${cur} words=3D${words} cwords=3D$= {cwords}" >> /tmp/comp_test.txt > } > > compdef _foo foo > --- > > Which results in: > cur=3Dfoo words=3D cwords=3Dfoo > > Strangely enough, if I use the #compdef tag, the code works fine (words= =3D"foo"). > > Any ideas? $words is a special array used for completion. See `man zshcompsys' for more about it. Best regards, --=20 J=C3=A9r=C3=A9mie