Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Set option in parent after emulate -L zsh
- X-seq: zsh-users 22546
- From: Sebastian Gniazdowski <psprint3@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Set option in parent after emulate -L zsh
- Date: Thu, 09 Mar 2017 00:58:56 -0800
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= mesmtp; bh=FXZM6itbIEzd+Yn+rM6TEfTNlm8=; b=kaL2JnmhWfFjEakGbXFws jcg2bKAbRwA+GGClrCmawo4/mcFFjBb10dZyLdXlyGx7f1eQ+Cx68sZPQMf8X7Qt NA5msVo2QKHZyM+A6B/GSMlpb1x6whX4VbAYjfAMDlhFCf4SQIY12XsCkrcIyW0R Tllz3AQr3jHeCGYmpdahpg=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=smtpout; bh=FXZM6itbIEzd+Yn+rM6TEfTNl m8=; b=JPjoskdMnCZniGlxV91eN3GsBlrMOp/FkX3nX6F5mT9eliINbdP9H5RKK eAxQttV5Ij2VR3nMF0HfPogMFvRbk1/wBEEfGLuDM3L2pa2ykVew4DjWtrHcO/5R 00rRMIQFngJuUvUat4mf1vtKV605GMbR5aOZtyive1FYh7beT4=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hello,
doing:
% unsetopt promptsubst # Should see garbage in prompt
% () { setopt promptsubst; }
restores correct prompt. Then, to handle emulate -L:
emulate -L zsh
unsetopt promptsubst
() { setopt promptsubst; } # no change
() { unsetopt localoptions; setopt promptsubst; } # prompt restored
echo $options[localoptions] $options[promptsubst] # shows "on on"
I wonder what does the "unsetopt localoptions" do. It connects current
function's level with parent locallevel in context of options, not
harming parent "localoptions" setting? That would be the best
possibility, but I'm afraid something different might be happening
maybe?
--
Sebastian Gniazdowski
psprint3@xxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author