From: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
To: zsh-workers@sunsite.dk
Subject: PATCH: Make subshells non-interactive
Date: Mon, 31 Jul 2006 13:57:09 +0200 [thread overview]
Message-ID: <44CDF015.60108@fs.ei.tum.de> (raw)
[-- 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 --]
next reply other threads:[~2006-07-31 13:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-31 11:57 Simon 'corecode' Schubert [this message]
2006-07-31 13:38 ` Peter Stephenson
2006-07-31 14:41 ` Simon 'corecode' Schubert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44CDF015.60108@fs.ei.tum.de \
--to=corecode@fs.ei.tum.de \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).