From: Peter Stephenson <p.stephenson@samsung.com>
To: <zsh-workers@zsh.org>, Emil Gedda <emil.gedda@ef.com>
Subject: Re: Parsing error on parsing 'A=1 time'
Date: Thu, 20 Jun 2019 12:04:09 +0100 [thread overview]
Message-ID: <1561028649.7411.21.camel@samsung.com> (raw)
In-Reply-To: <7A677F3A-4047-4D2F-A7FD-A1362955A79E@ef.com>
On Thu, 2019-06-20 at 10:14 +0000, Emil Gedda wrote:
> $ zsh -c 'A=1 time'
> zsh:1: parse error near `time'
It's a little obscure, but this isn't actually a bug. If you look in
the appropriate manual section, you'll see that "time" is defined as a
"complex command" which takes a pipeline as an argument. So assignments
etc. come after it (and potentially a number of "|"s with their own
command lines that may include assignemnets).
To put it another way, the parse error here is roughly similar to the
failure you get here:
A=1 { echo; }
In both cases, no command line can appear before the complex command.
pws
prev parent reply other threads:[~2019-06-20 11:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190620101612epcas1p3cc8576152f0692b019570469379111e5@epcas1p3.samsung.com>
2019-06-20 10:14 ` Emil Gedda
2019-06-20 11:04 ` Peter Stephenson [this message]
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=1561028649.7411.21.camel@samsung.com \
--to=p.stephenson@samsung.com \
--cc=emil.gedda@ef.com \
--cc=zsh-workers@zsh.org \
/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).