zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: PATCH: bug in ${(z)...} with newlines
Date: Thu, 17 Jun 2010 09:42:20 -0700	[thread overview]
Message-ID: <AANLkTinWJyX-4Mi_saoHfhDlBMYVTjyiIzZGiSagxM4W@mail.gmail.com> (raw)
In-Reply-To: <20100617125056.21e77f3e@csr.com>

On Thu, Jun 17, 2010 at 4:50 AM, Peter Stephenson
<Peter.Stephenson@csr.com> wrote:
> On Wed, 16 Jun 2010 15:13:29 -0700
> Bart Schaefer <schaefer@brasslantern.com> wrote:
>> BTW there are uses of (z) in Functions/Zle/ that may very well be
>> relying on the last ten years of behavior, including in
>> match-word-context and match-words-by-style and even which-command.
>
> Several of those are mine, which definitely don't rely on getting something
> other than split arguments.  I've been assuming up to now that as long
> as the words can be parsed (there are odd cases with unquoted
> parentheses and the like) there should be no gotchas, and in particular
> that if you've input quoted words separated by white space you should
> just get the words back (hence the current thread).

There are a bunch of other potential gotchas with (z) from that
standpoint, such as special treatment of redirection operators.  If
what you really want is purely quotation parsing, it may be better to
add something new rather than modify (z).

Also it is helpful to have something that can distinguish a newline
that would be parsed as a command separator from one that
shell-syntactically is merely whitespace.  That was Felix's original
problem all those years ago.


      reply	other threads:[~2010-06-17 16:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 13:07 Peter Stephenson
2010-06-09 14:34 ` Bart Schaefer
2010-06-09 14:36   ` Bart Schaefer
2010-06-09 15:54   ` Peter Stephenson
2010-06-16 22:06     ` Bart Schaefer
2010-06-16 22:13       ` Bart Schaefer
2010-06-17 11:50         ` Peter Stephenson
2010-06-17 16:42           ` 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=AANLkTinWJyX-4Mi_saoHfhDlBMYVTjyiIzZGiSagxM4W@mail.gmail.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).