Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] typeset: set $? on incidental error
- X-seq: zsh-workers 37615
- From: Eric Cook <llua@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] typeset: set $? on incidental error
- Date: Thu, 14 Jan 2016 00:24:36 -0500
- In-reply-to: <20160114001336.GA11173@tarsus.local2>
- 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: <20160114001336.GA11173@tarsus.local2>
On 01/13/2016 07:13 PM, Daniel Shahaf wrote:
> The 'typeset' family of builtins doesn't set $? when one would expect it
> to do so:
>
> % x=$(true) y=$(exit 42); echo $?
> 42
> % local x=$(true) y=$(exit 42); echo $?
> 0
>
> This patch makes 'typeset' behave as ordiary assignment does.
But who expects that? no other shell with a typeset behaves that way.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author