Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: When should interactive option be set/.zshrc read?



Andrej wrote:
> "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.

This probably means we've already broken it by unsetting MONITOR, in which
case unsetting INTERACTIVE as well would be logical.

However, it's not true that running in a subshell changes the basic feature
of an interactive shell: standard input remains the tty, and the shell
continues to read commands from the usual source --- unless, of course, the
subshell is for some special purpose, such as a command substitution or
part of a pipeline.  But by that score we would have to unset INTERACTIVE
when the current shell is running as the righthand side of a pipeline,
which is clearly not on.  So it's not all that clear cut.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070



Messages sorted by: Reverse Date, Date, Thread, Author