From: Bart Schaefer <schaefer@brasslantern.com>
To: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
Cc: Zsh hackers list <zsh-workers@sunsite.auc.dk>
Subject: Re: PATCH: function parsing
Date: Tue, 4 Jun 2002 09:33:15 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.44.0206040924360.9656-100000@ns1.sodaware.com> (raw)
In-Reply-To: <20020604161825.A65341C0B5@pwstephenson.fsnet.co.uk>
On Tue, 4 Jun 2002, Peter Stephenson wrote:
> % zsh -c 'function func { } this fails to cause a parse error'
> zsh: parse error near `this'
> % zsh -c 'func() { } this fails to cause a parse error'
> %
>
> I'm assuming the first is correct, since the second certainly isn't as
> the text is simply ignored.
While you're at it, any chance you can "fix" redirections following a
function definition? E.g. per ksh (and possibly per posix) this:
func() { less } < /etc/termcap
should be equivalent to this:
func() { { less } < /etc/termcap }
rather than the current zsh equivalent:
{ func() { less } } < /etc/termcap
Note that:
func() less < /etc/termcap
is already equivalent to:
func() { less < /etc/termcap }
so the first case above must be only a small matter of parsing.
next prev parent reply other threads:[~2002-06-04 16:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-04 16:18 Peter Stephenson
2002-06-04 16:33 ` Bart Schaefer [this message]
2002-06-05 10:56 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0206040924360.9656-100000@ns1.sodaware.com \
--to=schaefer@brasslantern.com \
--cc=pws@pwstephenson.fsnet.co.uk \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).