Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Function code breaking out of if then ...fi
- X-seq: zsh-workers 30777
- From: Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Function code breaking out of if then ...fi
- Date: Mon, 5 Nov 2012 17:31:55 +0800
- In-reply-to: <20121105082250.GA2200@localhost.localdomain>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAPHw+0WsmZAsfMVyE0zYkq46=qHFH8U_6qNRD=JbNti2_oMd_A@mail.gmail.com> <121102143911.ZM14168@torch.brasslantern.com> <20121105082250.GA2200@localhost.localdomain>
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