From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7536 invoked from network); 26 Jul 2005 14:12:53 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Jul 2005 14:12:53 -0000 Received: (qmail 79782 invoked from network); 26 Jul 2005 14:12:48 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Jul 2005 14:12:48 -0000 Received: (qmail 3210 invoked by alias); 26 Jul 2005 14:12:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21528 Received: (qmail 3201 invoked from network); 26 Jul 2005 14:12:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Jul 2005 14:12:44 -0000 Received: (qmail 79329 invoked from network); 26 Jul 2005 14:12:44 -0000 Received: from vms044pub.verizon.net (206.46.252.44) by a.mx.sunsite.dk with SMTP; 26 Jul 2005 14:12:38 -0000 Received: from candle.brasslantern.com ([71.116.88.149]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IK80040HNGVGPQ3@vms044.mailsrvcs.net> for zsh-workers@sunsite.dk; Tue, 26 Jul 2005 09:12:32 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j6QECV0l029411 for ; Tue, 26 Jul 2005 07:12:31 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j6QECVbr029410 for zsh-workers@sunsite.dk; Tue, 26 Jul 2005 07:12:31 -0700 Date: Tue, 26 Jul 2005 14:12:30 +0000 From: Bart Schaefer Subject: Re: PATCH: Re: Implementation of simple newuser module (how to start?) In-reply-to: <200507261021.j6QALB6j032205@news01.csr.com> To: zsh-workers@sunsite.dk Message-id: <1050726141230.ZM29409@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <200507201401.j6KE1k5i004733@news01.csr.com> <200507201804.j6KI474K004991@news01.csr.com> <1050723051057.ZM10317@candle.brasslantern.com> <200507250936.j6P9aVAR005452@news01.csr.com> <200507261021.j6QALB6j032205@news01.csr.com> Comments: In reply to Peter Stephenson "Re: PATCH: Re: Implementation of simple newuser module (how to start?)" (Jul 26, 11:21am) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 On Jul 26, 11:21am, Peter Stephenson wrote: } Subject: Re: PATCH: Re: Implementation of simple newuser module (how to st } } Peter Stephenson wrote: } > Bart Schaefer wrote: } > > autoload -U +X zsh-install-newuser && zsh-install-newuser } > } > But autoload +X returns false if the function was already defined, } > so it wouldn't execute the function in that case. } } The following takes account of that. Sorry, I forgot to respond to this thread yesterday ... It was actually my intention that the function not be executed if it is not the same function loaded by this module. If the sysadmin has gone to the trouble of defining a zsh-install-newuser [sic] then he ought to run it himself, or be able to decide when it is run, without this module jumping in. However, I don't have any strong objection to what's in your patch. } I've made the function a bit safer, so that if it gets run } automatically it doesn't trash .zshrc. You mean, if it gets run manually? I'd have been tempted to setopt noclobber after the emulate ...