From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5524 invoked from network); 29 Sep 2006 17:57:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Sep 2006 17:57:12 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 65422 invoked from network); 29 Sep 2006 17:57:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Sep 2006 17:57:05 -0000 Received: (qmail 21963 invoked by alias); 29 Sep 2006 17:57:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22789 Received: (qmail 21954 invoked from network); 29 Sep 2006 17:57:01 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 Sep 2006 17:57:01 -0000 Received: (qmail 65162 invoked from network); 29 Sep 2006 17:57:01 -0000 Received: from qb-out-0506.google.com (72.14.204.234) by a.mx.sunsite.dk with SMTP; 29 Sep 2006 17:56:59 -0000 Received: by qb-out-0506.google.com with SMTP id a10so309340qbd for ; Fri, 29 Sep 2006 10:56:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=TBCsRTmTF/gZm+UAErgRTlwOQU9Em5DbKJ+De0BRJCuaPu1MwqKgqEn0jD7HNTCeI/bz7xSAo0+0DsZGmF13RZJsFTQnYQHhtQaL7WBrW0aTSWD22vnYrkDmw2FWVnF1yAUnJL+SKK4qlJphjjS6lgWIkk9rYxfL4M7IhrWI8CY= Received: by 10.90.34.9 with SMTP id h9mr1872181agh; Fri, 29 Sep 2006 10:56:57 -0700 (PDT) Received: by 10.90.36.4 with HTTP; Fri, 29 Sep 2006 10:56:57 -0700 (PDT) Message-ID: <20a807210609291056h6efb7553q19f33e688ca1cb33@mail.gmail.com> Date: Fri, 29 Sep 2006 13:56:57 -0400 From: "Vin Shelton" Sender: ethersoft@gmail.com To: "Peter Stephenson" Subject: Re: newuser loaded for scripts Cc: "zsh workers" In-Reply-To: <200609280941.k8S9fjQn014225@news01.csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060927203335.GC22780@fsst.voodoo.lan> <200609280941.k8S9fjQn014225@news01.csr.com> X-Google-Sender-Auth: 3d70baa1711c18a7 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 + + * Src/init.c: Source zshenv even if non-interactive. + 2006-09-28 Peter Stephenson * 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 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 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