Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bufferwords() lexes a subshell in a shortloop repeat as a string
- X-seq: zsh-workers 37671
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a string
- Date: Mon, 18 Jan 2016 10:45:48 +0000
- In-reply-to: <20160118022558.GC3979@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <20160115062648.GA14019@tarsus.local2> <20160115094117.5fcde75c@pwslap01u.europe.root.pri> <20160118022558.GC3979@tarsus.local2>
On Mon, 18 Jan 2016 02:25:58 +0000
Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author