Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: When should interactive option be set/.zshrc read?
- X-seq: zsh-workers 12758
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "Zsh hackers list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: RE: When should interactive option be set/.zshrc read?
- Date: Wed, 6 Sep 2000 17:23:49 +0400
- Importance: Normal
- In-reply-to: <0G0G00B57UDM35@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
>
> This is a completely different matter. The subshell inherits everything
> from the parent shell after the fork; it never re-initialiases. It does
> unset the options MONITOR and USEZLE, but not INTERACTIVE, for the
> subshell, however. One might have thought that it would either change all
> three or none. In particular, the effect of claiming to be interactive but
> not using ZLE looks a bit weird. Unless there is some standard behind
> this?
>
Here is what SUS V2 says:
A subshell environment will be created as a duplicate of the shell
environment, except that signal traps set by that shell environment will be
set to the default values. Changes made to the subshell environment will not
affect the shell environment. Command substitution, commands that are grouped
with parentheses and asynchronous lists will be executed in a subshell
environment. Additionally, each command of a multi-command pipeline is in a
subshell environment; as an extension, however, any or all commands in a
pipeline may be executed in the current environment. All other commands will
be executed in the current shell environment.
"Environment" includes current option settings, aliases, functions etc. SUS V2
shell supports job control, and has MONITOR option that is on if shell is
interactive. But it is silent on what happens with these options in subshell.
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author