From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13961 invoked from network); 4 Apr 2003 15:49:58 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 4 Apr 2003 15:49:58 -0000 Received: (qmail 18974 invoked by alias); 4 Apr 2003 15:49:40 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6010 Received: (qmail 18961 invoked from network); 4 Apr 2003 15:49:39 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 4 Apr 2003 15:49:39 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [152.81.1.70] by sunsite.dk (MessageWall 1.0.8) with SMTP; 4 Apr 2003 15:49:39 -0000 Received: from localhost.loria.fr (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 6A1DF6471; Fri, 4 Apr 2003 17:49:39 +0200 (MEST) X-Amavix: Anti-spam check done by SpamAssassin X-Amavix: Anti-virus check done by McAfee X-Amavix: Scanned by Amavix Received: from greux.loria.fr (greux.loria.fr [152.81.2.43]) by macker.loria.fr (Postfix) with ESMTP id 3971B6BC4; Fri, 4 Apr 2003 17:49:38 +0200 (MEST) Received: from lefevre by greux.loria.fr with local (Exim 3.36 #1 (Debian)) id 191TRi-0001he-00; Fri, 04 Apr 2003 17:49:38 +0200 Date: Fri, 4 Apr 2003 17:49:38 +0200 From: Vincent Lefevre To: zsh-users@sunsite.dk Subject: Unsetting a variable that was not previously set Message-ID: <20030404154938.GE16102@greux.loria.fr> Mail-Followup-To: zsh-users@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.4i zsh should return an exit status 0 when unsetting a variable that was not previously set. greux:~> zsh-beta -f greux% echo $ZSH_VERSION 4.1.0-dev-7 greux% unset blah && echo OK greux% It should have printed 'OK'. See http://www.opengroup.org/onlinepubs/007904975/utilities/unset.html "Unsetting a variable or function that was not previously set shall not be considered an error and does not cause the shell to abort." The following shells print 'OK' as expected: * /bin/sh under Solaris * /bin/sh under OSF1 * bash (under Linux) -- Vincent Lefèvre - Web: - 100% validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des Jeux Mathématiques et Logiques, TETRHEX, etc. Work: CR INRIA - computer arithmetic / SPACES project at LORIA