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

Re: completion bug: treats substitution of unset parameter as empty string



>>>>> On September 10, 2009 Peter Stephenson <pws@xxxxxxx> wrote:

> That's fine, however I think (belatedly answering your other question)
> that, since we don't need to backport this anywhere, using an anonymous
> function would be neater---so we're not relying on the value of "nounset"
> outside.  In practice if it were set outside all hell would break loose, so
> this is pretty pernickety, but perhaps it's a useful precedent.

That works too.  I went with the setopt .. unsetopt since that's what
other completion functions were doing.  I do prefer the anonymous
function, aside from my objection to calling such things functions.
If I could pass arguments after the '}' maybe but you still cannot
control when it is called - it's only a local scope, not a function.

greg



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