From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4010 invoked by alias); 14 Mar 2017 19:17:49 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22568 Received: (qmail 12008 invoked from network); 14 Mar 2017 19:17:49 -0000 X-Qmail-Scanner-Diagnostics: from new1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.221):SA:0(-0.4/5.0):. Processed in 1.468055 secs); 14 Mar 2017 19:17:49 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint3@fastmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.messagingengine.com designates 66.111.4.221 as permitted sender) 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= X-ME-Sender: Message-Id: <1489519062.3305775.911250584.6989BBE9@webmail.messagingengine.com> From: Sebastian Gniazdowski To: zsh-users@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-aac97429 Subject: Re: Set option in parent after emulate -L zsh Date: Tue, 14 Mar 2017 12:17:42 -0700 In-Reply-To: <170309140613.ZM30720@torch.brasslantern.com> 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@fastmail.com