From: "Vin Shelton" <acs@alumni.princeton.edu>
To: "Peter Stephenson" <pws@csr.com>
Cc: "zsh workers" <zsh-workers@sunsite.dk>
Subject: Re: newuser loaded for scripts
Date: Fri, 29 Sep 2006 13:56:57 -0400 [thread overview]
Message-ID: <20a807210609291056h6efb7553q19f33e688ca1cb33@mail.gmail.com> (raw)
In-Reply-To: <200609280941.k8S9fjQn014225@news01.csr.com>
Frank's fix seems to prevent scripts from sourcing ~/.zshenv. (I
think it's odd that none of the regression tests detected this.
Here's how I fixed this:
--- ChangeLog~ 2006-09-29 10:51:55.000000000 -0400
+++ ChangeLog 2006-09-29 13:43:41.803926416 -0400
@@ -1,3 +1,7 @@
+2006-09-29 Vin Shelton <acs@xemacs.org>
+
+ * Src/init.c: Source zshenv even if non-interactive.
+
2006-09-28 Peter Stephenson <pws@csr.com>
* 22783: Frank Terbeck: Src/init.c: don't load zsh/newuser
--- ../zsh-2006-09-28/Src/init.c 2006-09-28 07:30:58.000000000 -0400
+++ Src/init.c 2006-09-29 13:37:40.252890528 -0400
@@ -958,15 +958,17 @@
source(GLOBAL_ZSHENV);
#endif
- if (isset(RCS) && isset(INTERACTIVE) && unset(PRIVILEGED))
+ if (isset(RCS) && unset(PRIVILEGED))
{
- /*
- * Always attempt to load the newuser module to perform
- * checks for new zsh users. Don't care if we can't load it.
- */
- if (load_module_silence("zsh/newuser", 1)) {
- /* Unload it immediately. */
- unload_named_module("zsh/newuser", "zsh", 1);
+ if (isset(INTERACTIVE)) {
+ /*
+ * Always attempt to load the newuser module to perform
+ * checks for new zsh users. Don't care if we can't load it.
+ */
+ if (load_module_silence("zsh/newuser", 1)) {
+ /* Unload it immediately. */
+ unload_named_module("zsh/newuser", "zsh", 1);
+ }
}
sourcehome(".zshenv");
- Vin
On 9/28/06, Peter Stephenson <pws@csr.com> wrote:
> Frank Terbeck wrote:
> > Hi workers!
> >
> > Somebody who doesn't use zsh wondered, why the shell wants to
> > configure itself, just because he wants to run a script that is
> > written in zsh.
> >
> > Only loading the newuser module if the shell is interactive (which
> > should be enough) would fix this. I'm not too familiar with the zsh
> > code, but the change should be trivial.
>
> The module's script is supposed to check if it should really be running
> later on, keeping the tests here short, but this is a perfectly
> reasonable restriction, so I'll add it. Thanks.
>
> --
> Peter Stephenson <pws@csr.com> 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
>
--
Whoever you are, no matter how lonely,
the world offers itself to your imagination,
calls to you like the wild geese, harsh and exciting--
over and over announcing your place
in the family of things. Mary Oliver
next prev parent reply other threads:[~2006-09-29 17:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-27 20:33 Frank Terbeck
2006-09-28 9:41 ` Peter Stephenson
2006-09-29 17:56 ` Vin Shelton [this message]
2006-09-29 20:46 ` Peter Stephenson
2006-09-29 22:10 ` Frank Terbeck
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=20a807210609291056h6efb7553q19f33e688ca1cb33@mail.gmail.com \
--to=acs@alumni.princeton.edu \
--cc=pws@csr.com \
--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).