From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24812 invoked from network); 24 Jul 2006 10:04:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 Jul 2006 10:04:52 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 30044 invoked from network); 24 Jul 2006 10:04:43 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Jul 2006 10:04:43 -0000 Received: (qmail 25134 invoked by alias); 24 Jul 2006 10:04:34 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10543 Received: (qmail 25125 invoked from network); 24 Jul 2006 10:04:33 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 24 Jul 2006 10:04:33 -0000 Received: (qmail 28883 invoked from network); 24 Jul 2006 10:04:33 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 24 Jul 2006 10:04:32 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly06c.srv.mailcontrol.com (MailControl) with ESMTP id k6OA2PVQ013833 for ; Mon, 24 Jul 2006 11:04:16 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 24 Jul 2006 11:02:09 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.4/8.13.4) with ESMTP id k6OA1w67003774 for ; Mon, 24 Jul 2006 11:01:58 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.4/8.13.4/Submit) with ESMTP id k6OA1rvM003764 for ; Mon, 24 Jul 2006 11:01:58 +0100 Message-Id: <200607241001.k6OA1rvM003764@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-users@sunsite.dk Subject: Re: Does zsh have an equivalent to the shopt command ? In-reply-to: <96c45c490607240044t282314dcn149e04073c0c2a1f@mail.gmail.com> References: <96c45c490607220357h2c841b20q506de061f0e6f43b@mail.gmail.com> <200607221508.k6MF8W0w002651@pwslaptop.csr.com> <96c45c490607240044t282314dcn149e04073c0c2a1f@mail.gmail.com> Comments: In-reply-to Sean message dated "Mon, 24 Jul 2006 17:44:18 +1000." Date: Mon, 24 Jul 2006 11:01:53 +0100 From: Peter Stephenson X-OriginalArrivalTime: 24 Jul 2006 10:02:09.0515 (UTC) FILETIME=[3A0CBBB0:01C6AF08] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-00-10 (www.mailcontrol.com) on 10.67.0.116 Sean wrote: > On futher investigation, it appears that it is not actually choking on > that line, rather this code which appears in many of the case option > function calls: > > version() { sed -e 's/^ //' < TODO.TXT Manager > Version 1.6.3 > Author: Gina Trapani (ginatrapani@gmail.com) > Release date: 5/11/2006 > Last updated: 7/6/2006 > License: GPL, http://www.gnu.org/copyleft/gpl.html > More information and mailing list at http://todotxt.com > EndVersion > exit 1 > } Hmmm... again, that should work fine and does on my machine; the shell isn't asked to do anything much beyond parsing a here document. When you say "chokes", what do you mean? Obviously calling the function will cause the shell to exit, because of the "exit 1" at the end ; is it failing to print the message, exiting in some odd way, hanging...? Or are you saying the options to the parent function (with the getopts) are such that this function shouldn't be called? In which case, what combination of options to that function is causing unexpected behaviour? (I could believe getopts behaved differently from bash but I need to see the command line being passed.) I'm guessing a lot of the spaces in that function were actually tabs, but I've put those back and not had any problem. -- 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