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

PATCH: Make subshells non-interactive



[please cc: me on replies]

Hey,

I noticed that subshells of an interactive shell consider themself interactive as well.  I am not sure if this is desired, but making them non-interactive 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?

cheers
 simon

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
--- Src/exec.c~	2005-04-27 12:01:39.000000000 +0200
+++ Src/exec.c	2006-07-31 13:28:15.000000000 +0200
@@ -2705,7 +2705,7 @@
     }
     if (!(sigtrapped[SIGQUIT] & ZSIG_IGNORED))
 	signal_default(SIGQUIT);
-    opts[MONITOR] = opts[USEZLE] = 0;
+    opts[MONITOR] = opts[USEZLE] = opts[INTERACTIVE] = 0;
     zleactive = 0;
     if (cl)
 	clearjobtab(monitor);

Attachment: signature.asc
Description: OpenPGP digital signature



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