From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27463 invoked by alias); 27 Jun 2012 17:51:18 -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: 30535 Received: (qmail 8731 invoked from network); 27 Jun 2012 17:51:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120627105032.ZM25924@torch.brasslantern.com> Date: Wed, 27 Jun 2012 10:50:32 -0700 In-reply-to: Comments: In reply to Mikael Magnusson "typeset -F3 SECONDS doesn't work the first time" (Jun 26, 6:26pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh workers Subject: Re: typeset -F3 SECONDS doesn't work the first time MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jun 26, 6:26pm, Mikael Magnusson wrote: } Subject: typeset -F3 SECONDS doesn't work the first time } } I think the code in typeset_single() near } if (!readonly && !strcmp(pname, "SECONDS")) } is to blame, it does something magic if you're changing the type of } $SECONDS and then returns without checking any other options given to } typeset. I tried removing the return pm; and setting err=0; but that } segfaults. Try this: } else if (!setsecondstype(pm, on, off)) { if (value && !setsparam(pname, ztrdup(value))) return NULL; /* return pm; */ usepm = 1; err = 0; } (Not provided as a patch because I don't have time right now to test it.)