zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <psprint3@fastmail.com>
To: zsh-users@zsh.org
Subject: Re: Set option in parent after emulate -L zsh
Date: Tue, 14 Mar 2017 12:17:42 -0700	[thread overview]
Message-ID: <1489519062.3305775.911250584.6989BBE9@webmail.messagingengine.com> (raw)
In-Reply-To: <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


  parent reply	other threads:[~2017-03-14 19:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09  8:58 Sebastian Gniazdowski
2017-03-09 22:06 ` Bart Schaefer
2017-03-10  5:47   ` Daniel Shahaf
2017-03-14 19:17   ` Sebastian Gniazdowski [this message]
2017-03-14 20:24     ` Bart Schaefer
2017-03-14 20:39       ` Sebastian Gniazdowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1489519062.3305775.911250584.6989BBE9@webmail.messagingengine.com \
    --to=psprint3@fastmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).