zsh-workers
 help / color / mirror / code / Atom feed
* zle messes up 'words' variable?
@ 2011-04-27  8:26 Felipe Contreras
  2011-04-27  9:02 ` Jérémie Roquet
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Felipe Contreras @ 2011-04-27  8:26 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2011-05-05 21:18 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-27  8:26 zle messes up 'words' variable? Felipe Contreras
2011-04-27  9:02 ` Jérémie Roquet
2011-04-27  9:11   ` Felipe Contreras
2011-04-27  9:51     ` Felipe Contreras
2011-04-27 15:06 ` Bart Schaefer
2011-04-28 20:19 ` Felipe Contreras
2011-04-29  3:31   ` Bart Schaefer
2011-05-02 18:11     ` Felipe Contreras
2011-05-03  1:42       ` Bart Schaefer
2011-05-03  8:05         ` Felipe Contreras
2011-05-03 14:39           ` Bart Schaefer
2011-05-03 15:04             ` Bart Schaefer
2011-05-03 17:41               ` Felipe Contreras
2011-05-04  0:39                 ` Bart Schaefer
2011-05-05 14:39                   ` Felipe Contreras
2011-05-05 16:24                     ` Bart Schaefer
2011-05-05 16:40                       ` Felipe Contreras
2011-05-05 19:38                         ` Bart Schaefer
2011-05-05 20:14                           ` Felipe Contreras
2011-05-05 21:12                             ` Nikolai Weibull
2011-05-03 17:36             ` Felipe Contreras
2011-05-04  0:56               ` Bart Schaefer
2011-05-05 14:48                 ` Felipe Contreras
2011-05-05 15:50                   ` Bart Schaefer
2011-05-05 15:55                     ` Felipe Contreras

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).