From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4752 invoked by alias); 15 Dec 2009 10:23:33 -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: 27521 Received: (qmail 15209 invoked from network); 15 Dec 2009 10:23:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Tue, 15 Dec 2009 10:23:09 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: What's the last command in prompt expansion? Message-ID: <20091215102309.640a5a14@news01> In-Reply-To: <200912151002.nBFA2Ve3029420@news01.csr.com> References: <200912151002.nBFA2Ve3029420@news01.csr.com> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Dec 2009 10:23:10.0011 (UTC) FILETIME=[999728B0:01CA7D70] X-Scanned-By: MailControl A-09-22-10 (www.mailcontrol.com) on 10.68.0.118 On Tue, 15 Dec 2009 10:02:31 +0000 Peter Stephenson wrote: > Traps don't save and restore the status. This is deliberate, they are > supposed to be able to return a status to the surrounding environment. Actually, I've overstated the case here. If a trap function doesn't execute a "return" explicitly, the status should be maintained unless there was an error. So in general your TRAPALRM ought not to change it. -- 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