Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Could someone clarify how math functions work?
- X-seq: zsh-workers 34022
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Re: Could someone clarify how math functions work?
- Date: Sat, 20 Dec 2014 11:37:08 -0800
- In-reply-to: <20141219093551.5a89e4d9@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <54939F50.50102@gmx.com> <20141219093551.5a89e4d9@pwslap01u.europe.root.pri>
[> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author