From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8261 invoked by alias); 18 Oct 2013 15:48:51 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31842 Received: (qmail 188 invoked from network); 18 Oct 2013 15:48:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <131018084831.ZM8783@torch.brasslantern.com> Date: Fri, 18 Oct 2013 08:48:31 -0700 In-reply-to: <52613F82.1000009@redhat.com> Comments: In reply to Filip Krska "zsh syntax check fails on correct if [[ usage (rhbz 966911)" (Oct 18, 4:02pm) References: <52613F82.1000009@redhat.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Filip Krska , zsh-workers@zsh.org Subject: Re: zsh syntax check fails on correct if [[ usage (rhbz 966911) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 18, 4:02pm, Filip Krska wrote: } } zsh syntax check fails on simple script, which is syntactically OK, but zsh -n returns 1 Hmm, it's not actually the syntax check which is failing. If you run the test as zsh -vxn /tmp/test.zsh it becomes clear that zsh is actually executing some of the commands, and then returning the exit status of those commands rather than of the syntax check itself. Which is strange, particularly given that adding the ":" command in the if-block causes it to revert to executing nothing. (Changing the $(...) construct is a red herring, it's just changing the exit status of the line zsh is wrongly executing in the first place.)