Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zle messes up 'words' variable?



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