From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6937 invoked by alias); 14 May 2013 14:16:02 -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: 31404 Received: (qmail 19218 invoked from network); 14 May 2013 14:15:49 -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 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at vinc17.net does not designate permitted sender hosts) Date: Tue, 14 May 2013 16:15:45 +0200 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: PRINT_EXIT_VALUE option in scripts Message-ID: <20130514141545.GB3544@ypig.lip.ens-lyon.fr> Mail-Followup-To: zsh-workers@zsh.org 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.net/mutt/ User-Agent: Mutt/1.5.21-6305-vl-r59709 (2013-04-16) The PRINT_EXIT_VALUE option doesn't work in scripts or when a file is sourced: ---------------------------------------- #!/usr/bin/env zsh echo $ZSH_VERSION setopt PRINT_EXIT_VALUE /bin/false echo OK ---------------------------------------- ypig% ./tst 5.0.2 OK ypig% source ./tst 5.0.2 OK This was already the case with zsh 4.3.10. Is this intentional? The man page just says: PRINT_EXIT_VALUE (-1) Print the exit value of programs with non-zero exit status. Either the behavior or the documentation should be fixed. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)