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

Re: sourcing a sh file in zsh



On Sat, 17 Jan 2009 12:15:01 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Regardless I don't think we'd want to do this as yet another setopt.
> It's potential can of worms along the lines of ALL_EXPORT, in that
> one can end up accidentally applying a specific option context to a
> function definition where one didn't (or shouldn't) mean to do so.
> I'd lean toward something that works like the "emulation" global,
> which is still localized to function scope but which is changable
> only by the "emulate" command.
> 
> Combined with allowing "emulate" create a scope and run a command
> in that scope, is there anything else you'd need?
> 
> PWS, any comment on how difficult it would be to extend "emulate" in
> this way?  Would it require promoting emulate to a keyword?

I haven't heard anything that sounds particularly difficult, although it
obviously needs a firm grip on what's being set at what point.  I don't
see why emulate should have to behave specially as far as syntax is
concerned, as long as its behaviour is well defined.

-- 
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