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

Re: Regarding emulate: a thought, and refresh my memory?



On Mar 6,  8:22pm, Stephane Chazelas wrote:
} Subject: Re: Regarding emulate: a thought, and refresh my memory?
}
} 2012-03-06 20:06:52 +0000, Peter Stephenson:
} [...]
} > Can't see why not.  I often do "emulate -L zsh; setopt extendedglob
} > cbases", it would be sensible to put that in one command.
} [...]
} 
} What about special parameters like:
} 
} zsh_options=(noshwordsplit noposixstrings...)
} 
} emulate -L $zsh_options extendedglob

Yes, that's the idea, just not the precise formulation.

The first word (that doesn't begin with a hyphen) seen by "emulate" has
to be the name of the emulation mode.  So, based on PWS's feedback I've
just committed 30320, which enables for example this:

    zsh_options=(noshwordsplit noposixstrings ...)

    emulate -L zsh --$^zsh_options --extendedglob

Hmm, I should probably add a bit of doc to the description of the -c
flag pointing out that only the emulation mode is sticky, not the full
set of options one might throw in.

Unless PWS, who knows more about how the sticky emulation works than
I do, has a clever idea about that?



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