Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#310872: zsh can't be a ksh replacement (can't trap ERR).
- X-seq: zsh-workers 21283
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Clint Adams <schizo@xxxxxxxxxx>, Christophe Martin <schplurtz@xxxxxxx>, 310872@xxxxxxxxxxxxxxx
- Subject: Re: Bug#310872: zsh can't be a ksh replacement (can't trap ERR).
- Date: Fri, 27 May 2005 01:20:27 +0000
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <20050526191520.GA30061@xxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200505261638.SAA09610@xxxxxxxxxxxxxxxxx> <20050526191520.GA30061@xxxxxxxxxxx>
On May 26, 3:15pm, Clint Adams wrote:
} Subject: Re: Bug#310872: zsh can't be a ksh replacement (can't trap ERR).
}
} > This simple command fails using zsh as ksh (I did update-alternatives) :
} >
} > trap 'echo alert-an-error-occured' ERR
Zsh does not provide an ERR trap because some platforms on which zsh can be
compiled actually have SIGERR defined, which is a real OS-level signal and
not interchangeable with the ksh et al. use of ERR as a magic trap.
The zsh equivalent is
trap 'echo alert-an-error-occured' ZERR
A possible workaround would be
(( $signals[(I)ERR] )) || alias -g ERR=ZERR
} P.S., someone left conflict cruft in ChangeLog.
"cvs annotate" is great for finding someones.
I deleted the cruft.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author