From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15572 invoked from network); 11 Dec 2007 12:54:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Dec 2007 12:54:34 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 91376 invoked from network); 11 Dec 2007 12:54:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Dec 2007 12:54:27 -0000 Received: (qmail 20371 invoked by alias); 11 Dec 2007 12:54:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24208 Received: (qmail 20350 invoked from network); 11 Dec 2007 12:54:22 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 11 Dec 2007 12:54:22 -0000 Received: from virusfilter.dotsrc.org (bifrost [127.0.0.1]) by spamfilter.dotsrc.org (Postfix) with ESMTP id E98398058F3B for ; Tue, 11 Dec 2007 13:51:48 +0100 (CET) Received: from prunille.vinc17.org (vinc17.pck.nerim.net [213.41.242.187]) by bifrost.dotsrc.org (Postfix) with ESMTP for ; Tue, 11 Dec 2007 13:51:48 +0100 (CET) Received: by prunille.vinc17.org (Postfix, from userid 501) id 47A551C63338; Tue, 11 Dec 2007 13:54:19 +0100 (CET) Date: Tue, 11 Dec 2007 13:54:19 +0100 From: Vincent Lefevre To: zsh-workers@sunsite.dk Subject: "set -o foo" does not fail / does not abort the shell Message-ID: <20071211125419.GS13079@prunille.vinc17.org> Mail-Followup-To: zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.17-vl-r19795 (2007-12-08) X-Virus-Scanned: ClamAV using ClamSMTP I've tried the following with zsh-4.3.4-dev-4: $ Src/zsh -f -c 'emulate sh; set -o foo; echo "Didn''t abort ($?)"' set: no such option: foo Didn't abort (0) This is incorrect. The shell should abort as 'set' is a special builtin[*]: $ ksh93 -c 'set -o foo; echo "Didn''t abort ($?)"' ksh93[1]: set: foo: bad option(s) Usage: set [-sabefhkmnprtuvxBCGH] [-A name] [-o[option]] [arg ...] zsh: exit 2 ksh93 -c 'set -o foo; echo "Didn't abort ($?)"' [*] http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_08_01 http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_14 See also the discussion on: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452972 And in an interactive shell, "set -o foo" should return with a non-zero exit status. Please check the other special builtins: http://www.opengroup.org/onlinepubs/009695399/idx/sbi.html -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)