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

Re: Function code breaking out of if then ...fi



On Mon, Nov 05, 2012 at 04:22:50PM +0800, Han Pingtian wrote:
> On my latop, if use 'echo non-existing*' in the if command, the 
> script will exit immediately, looks like the glob failure is 
> considered an error of ERR_EXIT. And changing to
> 
>     { echo non-existing* } always { TRY_BLOCK_ERROR=0 }
> 
> doesn't help, it still exits immediately. In the contrast, using 'fn'
> won't trigger ERR_EXIT.
But the failure of 'echo non-existing*' won't trigger a 'trap "..." ZERR' command
at the sametime, this isn't like a normal failing command will do ...



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