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

Re: localoptions, emulate -L, and top-level shell



On Dec 5,  9:46am, Peter Stephenson wrote:
}
} I think setting localoptions globally for the benefit of safety with
} your own functions is a perfectly reasonable usage --- and it's also
} compatible with supplied functions, which will happily leave the glocal
} setting alone, so probably best not to do anything to undermine it
} centrally.

I wouldn't propose *preventing* it, and I agree that it should be OK to
set it in dotfiles at startup.

On the other hand executing "emulate -L" from an interactive prompt when
not inside a function scope is pretty suspicious -- it implies that the
user is expecting the emulation to have a limited scope.  A similar
point can be made about "setopt" if localoptions is applied at the same
time as one or more other options.

So I am musing about issuing a warning that the global scope is being
changed, and then doing it anyway, not musing about making it an error.



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