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

Re: zle messes up 'words' variable?



2011/4/27 Felipe Contreras <felipe.contreras@xxxxxxxxx>:
> 2011/4/27 Jérémie Roquet <arkanosis@xxxxxxxxx>:
>> 2011/4/27 Felipe Contreras <felipe.contreras@xxxxxxxxx>:
>>> I'm trying the following:
>>> ---
>>> set_vars ()
>>> {
>>>        cur="foo"
>>>        words="foo"
>>>        cwords="foo"
>>> }
>>>
>>> _foo ()
>>> {
>>>        local 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.

>>>        set_vars
>>>
>>>        echo "cur=${cur} words=${words} cwords=${cwords}" >> /tmp/comp_test.txt
>>> }
>>>
>>> compdef _foo foo
>>> ---


-- 
Felipe Contreras



Messages sorted by: Reverse Date, Date, Thread, Author