Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Set option in parent after emulate -L zsh
- X-seq: zsh-users 22568
 
- From: Sebastian Gniazdowski <psprint3@xxxxxxxxxxxx>
 
- To: zsh-users@xxxxxxx
 
- Subject: Re: Set option in parent after emulate -L zsh
 
- Date: Tue, 14 Mar 2017 12:17:42 -0700
 
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h=	content-transfer-encoding:content-type:date:from:in-reply-to	:message-id:mime-version:references:subject:to:x-me-sender	:x-me-sender:x-sasl-enc; s=mesmtp; bh=M1MBs6KEsrnV7K1yGaaxKW8+5B	g=; b=TBazB1aLn5lR57/ldlsv/dxg5x/3+ed9OxRutYkAOtllaAlz6TaovL8byT	tOHB0UM6GAv64ZLHqhsOzPZGL2OXmkSIoBIhJZo3svqEV+G3p/p7+hI9Vu0QoTr4	X9WQ+zHQUbLn60DZn7kQqG/x3IGylFTyV0O1TGdLYWwAsGxds=
 
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=	messagingengine.com; h=content-transfer-encoding:content-type	:date:from:in-reply-to:message-id:mime-version:references	:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=smtpout; bh=M1	MBs6KEsrnV7K1yGaaxKW8+5Bg=; b=eVBceFH0UNAcBBAYqXs65qraAvFXrsI4uA	pt0TQMatYN+9CscF0OzrXuI2QADKveMVgqYgO8d3gNQRsymEMOlV+OV8ktStMctG	7g3OBSerWrIPwJ0eSSmVyoOrahj7gTlarwA3QEjDrZTE8GP2hEYlGR+uO/msxIXD	2OrZhYNdQ=
 
- In-reply-to: <170309140613.ZM30720@torch.brasslantern.com>
 
- 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
 
- References: <1489049936.3120661.905537968.237F11E3@webmail.messagingengine.com> <170309140613.ZM30720@torch.brasslantern.com>
 
On Thu, Mar 9, 2017, at 03:06 PM, Bart Schaefer wrote:
> The options
>   XTRACE
>   LOCAL_OPTIONS
>   LOCAL_LOOPS
>   WARN_NESTED_VAR
> are always reset on function scope exit.  The options
>   PRIVILEGED
>   RESTRICTED
> are never restored as an effect of LOCAL_OPTIONS (but might be in case
> of a "sticky emulation").
But this doesn't answer my question. I'm wondering what happens here:
() { unsetopt localoptions; setopt promptsubst; }   # prompt restored
Doing this I'm able to set promptsubst in caller (which used emulate
-LR). This looks like: option-scope of (anon) is equated with scope of
caller. Is it really what happens?
-- 
  Sebastian Gniazdowski
  psprint3@xxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author