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

Re: PATCH: completion



Peter Stephenson wrote:

> Sven Wischnowsky wrote:
> >     Btw. I didn't change `_cvs' mainly because I use the `parameter'
> >     module and there is a bug with the stuff that `allows' local
> >     special parameters: the associative array `commands' in `_cvs' has 
> >     (obviously) the same name as the one from the `parameter'
> >     module. The new code in typeset_single() has the effect that this
> >     `local' parameter behaves like the one from the module, i.e. if
> >     you can't use the names of special parameters for local parameters 
> >     without having them behave like the global ones. Maybe we have to
> >     wait for Peter here...
> 
> This isn't a bug, local special parameters are supposed to stay special; it
> would have been much easier if they weren't.  At least, I could change it
> but then things like `local PATH=...' (which is now documented) wouldn't
> work.

Yes, I was to hasty to shout `bug', but this irritated me a lot...

Still, this is potentially dangerous if someone writes a module
defining some parameters  and someone else writes a shell function
using the same names -- almost everything can happen.

I think we should either rename all module parameters to `z*', showing 
(and documenting) how such parameters should be named, or we add a way 
to allow shell functions to say that they really want only a normal
local parameter.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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