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

Re: PATCH: Make subshells non-interactive



"Simon 'corecode' Schubert" wrote:
> I noticed that subshells of an interactive shell consider themself intera=
> ctive as well.  I am not sure if this is desired, but making them non-int=
> eractive helps to solve my real issue:
> 
> when executing
> 
> 	zsh% (cd .)
> 
> my chpwd function is executed.  In a subshell, I want to avoid that.
> Making the subshell be non-interactive and checking [[ -o interactive ]]
> in my chpwd() does the trick, but maybe there is a better solution?

Could you not test one of the existing options which is reset, zle or
monitor?

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



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