From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11007 invoked by alias); 27 Apr 2011 09:52:03 -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: 29087 Received: (qmail 11059 invoked from network); 27 Apr 2011 09:52:01 -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 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.161.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:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2q4iffal4zph7VvVpodxgqaIA17Pdzb0pCi8NpGOAKI=; b=Jv62fsOyuchmWgaxlr+MGDFRID/raq4yY6pMQgUg6DxTSqxj5vc9fP73sOeR4nxXik IQIyfRYLoi18vvg7u6d/Bxd2bSxehHxTio2XhaX4QPZn702Vv+bYlXqK99OWV3Z6P0Gl VENxgnJkrv6/g1oteFpDi8gfjMqiCFWWnqAB8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=b03qKKOGaUkkcm8HbAhTyBSBzPVNILoc8zuyFtkJtQ+04XJfjQdjUFpEfI8X19jr9Y QG1dzli23/yY2dh5vHUTYEg3nYZysLgImEIgjkNy/f/vdo4np/qjJtOsZPkzs2xrNaeR WJHoDVU4SMsg1xyIQ6fry/TSJnl89oZtjo4IA= MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 27 Apr 2011 12:51:55 +0300 Message-ID: Subject: Re: zle messes up 'words' variable? From: Felipe Contreras To: =?UTF-8?B?SsOpcsOpbWllIFJvcXVldA==?= Cc: zsh-workers@zsh.org, Jonathan Nieder Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2011/4/27 Felipe Contreras : > 2011/4/27 J=C3=A9r=C3=A9mie Roquet : >> 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 Also, Jonathan Nieder found that this works using 'typeset -h', but that's not supported in bash. It would be nice to tell zsh to use 'typeset -h' whenever it finds 'local', or something like that. >>> =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 >>> --- --=20 Felipe Contreras