From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13780 invoked from network); 26 Feb 2002 20:26:01 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Feb 2002 20:26:01 -0000 Received: (qmail 4346 invoked by alias); 26 Feb 2002 20:25:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16721 Received: (qmail 4332 invoked from network); 26 Feb 2002 20:25:55 -0000 Date: Tue, 26 Feb 2002 21:28:04 +0100 Organization: ViaDomus To: schaefer@brasslantern.com Subject: Re: About 'test' compatibility Cc: zsh-workers@sunsite.dk Message-ID: <3C7BEFD4.mail4HW1FAJ7V@viadomus.com> References: In-Reply-To: User-Agent: nail 9.29 12/10/01 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit From: DervishD Reply-To: DervishD Sender: DervishD X-Mailer: DervishD TWiSTiNG Mailer Hello Bart :)) First, thanks for your answer: *real* fast ;)) >Can you give an example of the way this is failing? Yes, this is the line: if [ "$DEFAULT" = "-d" -a -n "$3" ]; then do something else do another thing fi Well, when DEFAULT is '-d' and there is a third parameter (in this case $3 has the value 'n') the 'something' is not done. The 'another thing' is done instead :?? >Zsh 'test' does support -a for "and" but only when it appears as an >infix operator, e.g. Maybe the '-n' following '-a' is confusing zsh? >which zsh would interpret as infix -a only if $foo were non-empty. The >correct test would be > [ "$foo" -a "$bar" ] This is the case. Maybe I'm missing something, I'm afraid. Thanks a lot for your answer, Bart. Raśl