From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28042 invoked by alias); 11 Feb 2011 17:47:15 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28745 Received: (qmail 25830 invoked from network); 11 Feb 2011 17:47:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Fri, 11 Feb 2011 17:47:00 +0000 From: Peter Stephenson To: Subject: Re: loading user startup files for zsh scripts Message-ID: <20110211174700.60b8d3bb@pwslap01u.europe.root.pri> In-Reply-To: <110211092602.ZM485@torch.brasslantern.com> References: <19792.22365.139876.599478@gargle.gargle.HOWL> <110207213357.ZM22407@torch.brasslantern.com> <20110208172056.6a985c90@pwslap01u.europe.root.pri> <110208205856.ZM24066@torch.brasslantern.com> <110209085358.ZM29014@torch.brasslantern.com> <110210095253.ZM30860@torch.brasslantern.com> <110210192945.ZM31349@torch.brasslantern.com> <110211092602.ZM485@torch.brasslantern.com> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.103.11.49] X-Scanned-By: MailControl A_10_80_00 (www.mailcontrol.com) on 10.71.0.132 On Fri, 11 Feb 2011 09:26:02 -0800 Bart Schaefer wrote: > } I can add doc if you like it.. one open > } question is whether you want $ZSH_SCRIPT to be unset or empty when > not } running a script; currently it would be empty, which might be > useful } for detecting whether zsh is providing that parameter. > > I think empty is OK, but let's hear from PWS. I think empty is much more Zen-like, so fits perfectly. More(?) seriously, I don't think we'd want [[ -z $ZSH_SCRIPT ]] to trigger a "NO_UNSET" error if you weren't running a script, and I don't think (( ${+ZSH_SCRIPT} )) is as common an idiom for special variables. -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom