Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug: $? after empty command
- X-seq: zsh-workers 27120
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: bug: $? after empty command
- Date: Fri, 10 Jul 2009 10:02:28 +0100
- In-reply-to: <loom.20090709T214040-336@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: CSR
- References: <loom.20090709T130223-845@xxxxxxxxxxxxxx> <20090709154124.2cd2a227@news01> <loom.20090709T210453-932@xxxxxxxxxxxxxx> <loom.20090709T214040-336@xxxxxxxxxxxxxx>
On Thu, 9 Jul 2009 21:41:51 +0000 (UTC)
Eric Blake <ebb9@xxxxxxx> wrote:
> Eric Blake <ebb9 <at> byu.net> writes:
>
> > But just from inspection,
> > it looks like it does not cover these related issues, which are both required
> > by POSIX to output 0:
> >
> > $ zsh -c 'false; . /dev/null; echo $?'
> > 1
> > $ zsh -c 'false; ``; echo $?'
> > 1
>
> And another one that POSIX requires to output 0:
>
> $ zsh -c 'false; sleep& echo $?'
> 1
These still need fixing.
Also, I don't think it affects POSIX, because empty functions aren't
required to work, but in zsh, "fn() { }" is valid, and I suspect "fn"
logically ought to reset the status, too---basically anywhere where you've
run a complex command with an empty list of commands in it.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author