Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: localoptions, emulate -L, and top-level shell
- X-seq: zsh-workers 40103
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: localoptions, emulate -L, and top-level shell
- Date: Mon, 5 Dec 2016 16:09:30 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=Se/YtDgXPldObkOTJGZUZ3dBRrwJVJczxK8s2FGuj1c=; b=Hzym7Hb2COlYIukKIPvCejkjr01/wVLz6+36/wGZJeRHOW72SHmY+3Fg20KF+dk8uf wjT4MV4bogtgoC6g7uEM8l2MboMIyBvTJupnXjYNKCkTbIT2VG+FzsAU1777Y32G/dNY 4D9Lskx0KkFNxD1gpk65yOn7sc73KkiiZrKGt5aCv6blVnPSzD4yzTFpiuC4RbY8taTL SWVs1ShJcZPMLBYJyiu8kvCtRZqqirjCrvUn0tHlmD1r8Oy26Q4ws+c752Ki7qT2+sg4 nbGHSI73OTUW9xgbBsF9gerIg7cP+FzIn72cW7T31eCI90QpVhcKaFpXqT8ekzp7wiVI Jcmw==
- In-reply-to: <20161205094612.2ca609b3@pwslap01u.europe.root.pri>
- 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
- References: <161202155033.ZM5595@torch.brasslantern.com> <CGME20161203082701epcas2p3e0813726eb471a8534d1f7effefdee63@epcas2p3.samsung.com> <20161203082343.GA6789@fujitsu.shahaf.local2> <20161205094612.2ca609b3@pwslap01u.europe.root.pri>
On Dec 5, 9:46am, Peter Stephenson wrote:
}
} 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 wouldn't propose *preventing* it, and I agree that it should be OK to
set it in dotfiles at startup.
On the other hand executing "emulate -L" from an interactive prompt when
not inside a function scope is pretty suspicious -- it implies that the
user is expecting the emulation to have a limited scope. A similar
point can be made about "setopt" if localoptions is applied at the same
time as one or more other options.
So I am musing about issuing a warning that the global scope is being
changed, and then doing it anyway, not musing about making it an error.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author