From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6678 invoked from network); 5 Jul 2001 16:27:06 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Jul 2001 16:27:06 -0000 Received: (qmail 8738 invoked by alias); 5 Jul 2001 16:26:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15263 Received: (qmail 8723 invoked from network); 5 Jul 2001 16:26:03 -0000 From: "Bart Schaefer" Message-Id: <1010705162523.ZM2966@candle.brasslantern.com> Date: Thu, 5 Jul 2001 16:25:23 +0000 In-Reply-To: References: <200107051359.PAA10777@beta.informatik.hu-berlin.de> <003101c1055d$356b0cb0$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: Peter Stephenson , zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: Short `if' MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 5, 2:57pm, Peter Stephenson wrote: } Subject: Short `if' } } I can't get the short form of `if' to work, described in the manual as: } } if LIST SUBLIST } A short form of the alternate `if'. } } What am I doing wrong? The documentation does explain this: The short versions below only work if SUBLIST is of the form `{ LIST }' or if the SHORT_LOOPS option is set. In this case, the test part of the loop must also be suitably delimited, such ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ as by `[[ ... ]]' or `(( ... ))', else the end of the test will not be recognized. "In this case" does NOT mean "if the SHORT_LOOPS option is set." It should probably say "in either of these cases ..." If I (dimly) recall correctly, the documentation originally said: The short versions below only work if SUBLIST is of the form `{ LIST }'. In this case, ... And then later the SHORT_LOOPS option was added and the "or if ..." was stuck into the sentence without fixing the rest of it. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net