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

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

On Sat, 03 Mar 2012 17:25:21 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> The code in bin_emulate dating all the way back to Andrej's patch in
> zsh-workers/26425 rejects the combination of -L and -c.  The stated
> reason for this is "do not confuse user who reads manuals."  However,
> the -c option always restores everything at the end, and anyway one
> can always run
>     emulate zsh -c 'setopt localoptions; ...'
> so I'm hoping someone can remind me why we bother throwing an error
> on that combination.

I can't imagine there's anything fundamental about it.
> The reason I ask is because it suddenly popped into my head that the
> emulate command might just as well parse other startup-time options
> besides just -c.

Can't see why not.  I often do "emulate -L zsh; setopt extendedglob
cbases", it would be sensible to put that in one command.

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