zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [BUG] (z)-flag interrupts if $() in input
Date: Sun, 30 Oct 2016 10:55:40 -0700	[thread overview]
Message-ID: <161030105540.ZM14392@torch.brasslantern.com> (raw)
In-Reply-To: <20161030152525.GA12137@fujitsu.shahaf.local2>

On Oct 30,  3:25pm, Daniel Shahaf wrote:
}
} "eval $a" returns a parse error in zsh but succeeds in sh.  Let's put
} (z) to one side for the moment;

This actually is a question about (z) rather than about parse errors,
because other parse errors don't have the same problem:

torch% echo ||| print
zsh: parse error near `|'
torch% a='echo ||| print'
torch% print -rl -- ${(z)a}
echo
||
|
print

So the question is not whether $() is a parse error, but why $() eats
the rest of the command line.

Which I think is going to come down to the way cmd_or_math() has to
read ahead to discover whether $( starts a math expresion or a
command substitution -- but I haven't dug in that far.


      parent reply	other threads:[~2016-10-30 17:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-30  6:33 Sebastian Gniazdowski
2016-10-30 15:25 ` Daniel Shahaf
2016-10-30 17:09   ` Peter Stephenson
2016-10-30 18:04     ` Bart Schaefer
2016-10-30 20:14       ` Bart Schaefer
2016-11-03 10:23       ` Peter Stephenson
2016-10-30 17:55   ` Bart Schaefer [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=161030105540.ZM14392@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).