zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a string
Date: Mon, 18 Jan 2016 10:45:48 +0000	[thread overview]
Message-ID: <20160118104548.7db26f60@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20160118022558.GC3979@tarsus.local2>

On Mon, 18 Jan 2016 02:25:58 +0000
Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Even after reading your other reply, I still don't understand what
> distinction you're trying to draw here, what case you say isn't expected
> to work.  Could you clarify, please?

No, the whole point is I *can't* say what case isn't going to work, just
that there will be a vast heap of them if you attempt to split arbitrary
strings and prod the result in enough detail..

The underlying splitting is executing the raw lexer with various
squiggles on top to fix up some special cases (but only some).  It's
doing it in a way which is sort-of helpful to completion, but it's doing
it thoroughly inconsistently, given that in the case of (z) all it's
been told is "here, have this string which has got some bits of command
line in".  So you just have to see what actually works and work round
it.  (Or, of course, rewrite the whole thing, which would be nice, but I
don't think is ever going to happen.)

There is some special casing in bufferwords() for loops, though, so
maybe the case you want isn't far off working.

pws


  reply	other threads:[~2016-01-18 10:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15  6:26 Daniel Shahaf
2016-01-15  9:41 ` Peter Stephenson
2016-01-15 19:25   ` Bart Schaefer
2016-01-17 18:16     ` Peter Stephenson
2016-01-17 22:46       ` Bart Schaefer
2016-01-18  9:41         ` Peter Stephenson
2016-01-18 16:36           ` Bart Schaefer
2016-01-18 16:52             ` Peter Stephenson
2016-01-19  0:32               ` Bart Schaefer
2016-01-19  3:29                 ` Bart Schaefer
2016-01-19  4:07                   ` kshglob + noglob (was Re: bufferwords() lexes ....) Bart Schaefer
2016-01-19  9:36                 ` bufferwords() lexes a subshell in a shortloop repeat as a string Peter Stephenson
2016-01-19 18:59                   ` Bart Schaefer
2016-01-18  2:25   ` Daniel Shahaf
2016-01-18 10:45     ` Peter Stephenson [this message]
2016-01-20  7:47       ` Daniel Shahaf
2016-01-20 15:59         ` Bart Schaefer
2016-01-21  6:50           ` Bart Schaefer
2016-01-23 23:53           ` Daniel Shahaf
2016-01-24  5:56             ` Bart Schaefer
2016-01-19  4:56     ` Bart Schaefer
2016-01-20  7:47       ` Daniel Shahaf

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=20160118104548.7db26f60@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.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).