From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8303 invoked by alias); 20 Dec 2014 19:36:57 -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: 34022 Received: (qmail 13354 invoked from network); 20 Dec 2014 19:36:44 -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,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=LrklEcZZ c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=A92cGCtB03wA:10 a=fC-wKOlMw34-H_WJibkA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141220113708.ZM31285@torch.brasslantern.com> Date: Sat, 20 Dec 2014 11:37:08 -0800 In-reply-to: <20141219093551.5a89e4d9@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: Could someone clarify how math functions work?" (Dec 19, 9:35am) References: <54939F50.50102@gmx.com> <20141219093551.5a89e4d9@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Subject: Re: Could someone clarify how math functions work? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii [> workers] On Dec 19, 9:35am, Peter Stephenson wrote: } } I'm wondering, however, if we can do a bit better by strengthening the } warnings against variant syntax --- whose sole role appears to be to } confuse the user --- and provide some kind of good practice guide for } complex syntax such as functions, loops, etc. But would anyone read it? Grammatically, "subshell() ( ... )" is not "variant syntax" it's just an uncommon usage of the standard syntax. SHORT_LOOPS on the other hand ... Either way, we could introduce an option similar to WARN_CREATE_GLOBAL that prints runtime (parse time? "verbose" output time?) warnings for some of these things. It'd take a bit of work to track down all the cases we might want to warn about. Then one could e.g. zsh -o warn_odd_syntax -n scriptfile We'd have to decide whether multios are in this category, etc. There is no clear line between zsh-specific syntax that one might use intentionally and "variant" syntax that one might use accidentally. And subshells are even more a case of "did-he-mean-that?" when used where a current-shell construct in braces would be more common.