From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24842 invoked from network); 29 Dec 2003 09:21:38 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 29 Dec 2003 09:21:38 -0000 Received: (qmail 9331 invoked by alias); 29 Dec 2003 09:21:24 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6965 Received: (qmail 9261 invoked from network); 29 Dec 2003 09:21:24 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 29 Dec 2003 09:21:24 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [216.228.9.89] by sunsite.dk (MessageWall 1.0.8) with SMTP; 29 Dec 2003 9:21:23 -0000 Received: by binome.blorf.net (Postfix, from userid 1000) id EE53F2F98; Mon, 29 Dec 2003 01:21:22 -0800 (PST) Date: Mon, 29 Dec 2003 01:21:22 -0800 From: Wayne Davison To: Vincent Stemen Cc: zsh-users@sunsite.dk Subject: Re: Possible bug in zsh Message-ID: <20031229092122.GA23732@binome.blorf.net> References: <20031229080222.GA75453@quark.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031229080222.GA75453@quark.localdomain> User-Agent: Mutt/1.5.4i 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..