Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: localoptions, emulate -L, and top-level shell
- X-seq: zsh-workers 40094
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: localoptions, emulate -L, and top-level shell
- Date: Mon, 05 Dec 2016 09:46:12 +0000
- Cms-type: 201P
- In-reply-to: <20161203082343.GA6789@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <161202155033.ZM5595@torch.brasslantern.com> <CGME20161203082701epcas2p3e0813726eb471a8534d1f7effefdee63@epcas2p3.samsung.com> <20161203082343.GA6789@fujitsu.shahaf.local2>
On Sat, 3 Dec 2016 08:23:43 +0000
Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> Bart Schaefer wrote on Fri, Dec 02, 2016 at 15:50:33 -0800:
> > I'm wondering whether "setopt localoptions", including via "emulate -L",
> > perhaps ought to at least grumble if its state changes from unset to set
> > at the top level of an interactive shell.
> >
> > Can wait until after 5.3, obviously. Just thinking "aloud."
>
> Perhaps some people intentionally setopt localoptions in .zshrc so that
> no plugin can change global options... but then, a plugin doing «setopt
> nolocaloptions foo» would still set 'foo' globally, despite the zshrc
> setting.
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'm vaguely aware of having used "nolocaloptions" to pass up option
settings in the past, but I don't think there are standard functions
that do that.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author