Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zle messes up 'words' variable?
- X-seq: zsh-workers 29080
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: zle messes up 'words' variable?
- Date: Wed, 27 Apr 2011 11:26:14 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=TKXh5FCwEBbE63O2MKrTRPR5h3IBCz4Se4+OTvIKCd0=; b=NdjIs0pjn587QLq6mdNqUtsXxg++8C59oBXGYgWGq/yVHGef6rnZ9Sm/kheXXVMNEx TbiBayFOD58+HAPOpQECMIuSdeX0uQO5CUqB6lWufRoz9+W4ofAn1iLDYxgLoBnVQa94 10tlrebY0K+jQzT9mtJznld1ZVCrQAje+ZNLM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Yl2eec87akRDgIln1nrnpIIgrLbAr04A0A47h8UjX/D9AXz91nwl8738NljvUA7bVu 7vMwJ0mnLKNqxyKiIs7Z7BIxgB7S4wVkMxFkoyM2Smqam24CEvmsdPTC1IngecxwssWU Ij6fdbjFvQ1a28sFTnaNwngqg2dw5B7TMMEEk=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
I'm trying the following:
---
set_vars ()
{
cur="foo"
words="foo"
cwords="foo"
}
_foo ()
{
local cur words cwords
set_vars
echo "cur=${cur} words=${words} cwords=${cwords}" >> /tmp/comp_test.txt
}
compdef _foo foo
---
Which results in:
cur=foo words= cwords=foo
Strangely enough, if I use the #compdef tag, the code works fine (words="foo").
Any ideas?
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author