Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Possible bug in zsh
- X-seq: zsh-users 6965
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Vincent Stemen <zsh@xxxxxxxxxxx>
- Subject: Re: Possible bug in zsh
- Date: Mon, 29 Dec 2003 01:21:22 -0800
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20031229080222.GA75453@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20031229080222.GA75453@xxxxxxxxxxxxxxxxx>
On Mon, Dec 29, 2003 at 02:02:22AM -0600, Vincent Stemen wrote:
> I think I may have encountered a bug in Z shell.
Here's a simplified test case that better shows what's gone wrong:
false; if eval ''; then echo one; fi
true; if eval ''; then echo two; fi
This outputs only "two" in zsh, but both "one" and "two" in bash. It
appears that an eval of an empty string in zsh returns the return code
of the last-run command. In your example script, the "[ -n ...]" part
failed, so the following "if ! eval $empty ..." bit was executed as if
the eval of the empty string had also failed. I also assume that this
is a bug.
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author