From: "Bart Schaefer" <schaefer@brasslantern.com>
To: "Andrej Borsenkow" <borsenkow.msk@sni.de>,
"ZSH workers mailing list" <zsh-workers@math.gatech.edu>
Subject: Re: emulate -R resets localoptions
Date: Fri, 5 Jun 1998 01:54:15 -0700 [thread overview]
Message-ID: <980605015415.ZM17368@candle.brasslantern.com> (raw)
In-Reply-To: <005901bd9057$b7a4fe80$21c9ca95@ao13.mow.sni.de>
On Jun 5, 11:58am, Andrej Borsenkow wrote:
} Subject: emulate -R resets localoptions
}
} emulate -R seems to reset *all* options, in particular localoptions. I find
} it confusing; it breaks my simple notion
Yes, you're right; the whole point of -R is in fact to reset *all* the
options, just like the doc says.
The effect of this on localoptions is semi-documented, but probably ought
to be stated explicitly in the doc somewhere. If you look at the sample
functions that come with the distribution, you'll find that any of them
that use emulate use it like this:
emulate -R zsh
setopt localoptions
The reason I say it's semi-documented is:
LOCAL_OPTIONS
If this option is set at the point of return from a shell
function, all the options (including this one) which were in force
upon entry to the function are restored.
Note "at the point of return." That means you have to be sure to set
localoptions only after you're sure nothing else is going to change it.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
prev parent reply other threads:[~1998-06-05 8:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-05 7:58 Andrej Borsenkow
1998-06-05 8:44 ` Zefram
1998-06-05 8:54 ` Bart Schaefer [this message]
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=980605015415.ZM17368@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=borsenkow.msk@sni.de \
--cc=zsh-workers@math.gatech.edu \
/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).