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

Re: [PATCH] typeset reply array



On Sun, 18 May 2008 05:33:01 +0000
Clint Adams <schizo@xxxxxxxxxx> wrote:
> I think that some of these will break things. For example, if you keep 
> _comp_dumpfile local to compinit, when/if compinit calls compdump,
> problems might ensue.

Commonly used but non-global parameters such as "reply" could, and
probably should, be made local to the top-level of completion at around
the point where the options get set.  This would save them appearing in
the user's own space, which was the whole point of warncreateglobal in
the first place.

I don't think any special *internal* handling is warranted for
parameters that aren't themselves special to the shell.

A "typeset -g" for variables that *should* be global makes perfect
sense.  The "-g" should definitely be present even if the code isn't
inside a function (although the compinit stuff is), since we shouldn't
make that assumption.

> I don't know why we can't call compdump with an argument though.

I can't see why we shouldn't either.  I have a vague memory of wondering
that before.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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