Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: emulate -R resets localoptions
- X-seq: zsh-workers 4050
- From: Zefram <zefram@xxxxxxxxx>
- To: borsenkow.msk@xxxxxx (Andrej Borsenkow)
- Subject: Re: emulate -R resets localoptions
- Date: Fri, 5 Jun 1998 09:44:19 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <005901bd9057$b7a4fe80$21c9ca95@xxxxxxxxxxxxxxx> from "Andrej Borsenkow" at Jun 5, 98 11:58:23 am
Andrej Borsenkow wrote:
>emulate -R seems to reset *all* options, in particular localoptions.
That's what it's supposed to do. At least, it is supposed to reset all
configuration options -- it does not set the options relating to the
state of the shell, such as INTERACTIVE and PRIVILEGED.
> it breaks my simple notion, that I should be able to say
>
>function foo() {
> setopt localoptions
>
>and then set *any* option without fear, that it will mess the caller.
You can't set NO_LOCAL_OPTIONS without fear in any case. Your `simple
notation' is wrong -- you should set LOCAL_OPTIONS *after* setting
other options. LOCAL_OPTIONS is tested when the function returns,
not when options are set.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author