From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11651 invoked by alias); 22 Oct 2013 18:03:47 -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: 31870 Received: (qmail 9267 invoked from network); 22 Oct 2013 18:03:41 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=tPKYoKGf5VlF/jWdsH+5yuUgSJYmlmlM6Sgt1QSqlck=; b=UfYhBRcpaG0Zl3Tc3kJVmpyK3+BzKsrEjgXTSWmSXWFkh8RapsmIGIW1IBshiLFFW/ 34jgOV+MFPTVh17AwXOYbEIhwBZsylgmiIeB1NeYQigbczAGRPrpTHg85mlXUjCtpu+S Wm+1Dm+NAkgYxrYawK4JcRet3mlHtLSH75LnYFbkE5uR6pAPin+OMqJtJJFSUf8lMUap mY5jRtWRFZfgZ7WQjjiGC67yP3m3M/dbOr57i+mA4JhjDr9f9UvyAGQnr9wJzhJ/AdhT lTDJ3emKMZbapeS6N2AhH7cSzUVaL7ntWnGjwr+9XpnmTSFdWaliGb4f/6DLI/jOYmkR K2eg== X-Received: by 10.58.54.69 with SMTP id h5mr1926951vep.25.1382465017274; Tue, 22 Oct 2013 11:03:37 -0700 (PDT) MIME-Version: 1.0 From: Ian F Date: Tue, 22 Oct 2013 11:03:07 -0700 Message-ID: Subject: Strange function/pipestatus behavior, maybe a scope bug? To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary=089e013cbbb045033104e9583893 --089e013cbbb045033104e9583893 Content-Type: text/plain; charset=ISO-8859-1 Hi, First time mailer, just subscribed. Thanks for taking the time to read this. Test cases: trueFunc() { true; } falseFunc() { false; } % false | true | false | true; echo $pipestatus 1 0 1 0 % false | true | false | true | trueFunc; echo $pipestatus 1 0 1 0 0 % false | true | false | true | falseFunc; echo $pipestatus 1 0 1 0 1 Potential bug case: awkFunc() { awk; } % false | true | false | true | awkFunc; echo $pipestatus 0 Thanks. Also, this does not happen in bash. %Ian -- Ian F Big hitter, the Lama --089e013cbbb045033104e9583893--