Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: What's the last command in prompt expansion?



On Tue, 15 Dec 2009 10:02:31 +0000
Peter Stephenson <pws@xxxxxxx> 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 <pws@xxxxxxx>            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



Messages sorted by: Reverse Date, Date, Thread, Author