zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Make subshells non-interactive
@ 2006-07-31 11:57 Simon 'corecode' Schubert
  2006-07-31 13:38 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Simon 'corecode' Schubert @ 2006-07-31 11:57 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 795 bytes --]

[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   / \

[-- Attachment #1.2: zsh-subsh-noninteractive.diff --]
[-- Type: text/plain, Size: 362 bytes --]

--- 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-31 14:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-31 11:57 PATCH: Make subshells non-interactive Simon 'corecode' Schubert
2006-07-31 13:38 ` Peter Stephenson
2006-07-31 14:41   ` Simon 'corecode' Schubert

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).