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

Re: more dependencies on emulation

On Jul 19,  2:12am, Zoltan Hidvegi wrote:
> Subject: Re: more dependencies on emulation
> Zefram wrote:
> > After this, the only use of emulation is in the emulate builtin itself,
> > and in initialisation (where it's difficult to avoid).
> I did not want to introduce new options like FUNCTION_ARGZERO and
> SH_FILE_SUBST because I consider these options useful only in sh/ksh
> compatibility mode.

Does that mean you're not planning to include these patches in 3.0?
Or does this:

> But my solition was certainly not very good.

mean that you ARE planning to include them?

> Increasing the number of settable options makes it
> more and more difficult to write zsh functions which are independent of the
> current options setting.

Actually, the only options that make this difficult are those that (1)
affect non-interactive behavior and (2) are not tied to an emulation.
As long as the "emulate" command sets/unsets all the appropriately-
tagged options, you can always do:

	zshfoo() {
	    setopt localoptions
	    emulate zsh
	    # Now do stuff using default zsh settings

Note, though, that for this to work "emulate" should never turn OFF
localoptions -- I note that it turns it ON for ksh, so right now it
probably also turns it off sometimes.

> > My comments in article 1669 about the option patch in article 1275 apply
> > here also.  Applying this patch by hand if you don't have the option
> > patch applied is not difficult.  If anyone wants an updated copy of the
> > option patch, mail me.
> I'd like one.  I wanted to include this in pre3 but again I had no time.

Ooooh.  I think I'd rather it stayed out for 3.0.

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