zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: Inconsistency with SHWORDSPLIT and leading spaces
Date: Sun, 8 Nov 2015 18:18:33 +0000	[thread overview]
Message-ID: <20151108181833.574cf0d6@ntlworld.com> (raw)
In-Reply-To: <151107114314.ZM24285@torch.brasslantern.com>

On Sat, 7 Nov 2015 11:43:14 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Nov 7,  5:42pm, Peter Stephenson wrote:
> }
> } +/*
> } + * Bit flags passed back from multsub() to paramsubst().
> } + */
> 
> Maybe now that we're doing this, we could have a bit flag passed in the
> other (and back?) direction for whether the (P) flag is in effect, and
> thereby fix the ${${(P)hash}[index]} thing?

It's a bit more complicated than that, though maybe doable.

If:

- we spot on the way down this is a multsub when we reached the nested
paramsubst() (we could do that with a pf_flags bit)

- we return a name of a parameter and a flag saying what we're doing on
noticing this

- we pass this up to the to paramsubst() regardless of what else is going
on in the prefork() and the multsub() --- this is the bit I a little scared
of, but (P) is so explicit in what it's doing maybe that's OK

- in the upper paramsubst we use the flag to retrieve a Value based on
the return, i.e. it now really is just a name for use up above as you
might have been entitled to think it always was --- this is surely doable
but I bet it's messier than you'd expect

does that do it?

pws


  reply	other threads:[~2015-11-08 18:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 10:54 Christian Neukirchen
2015-11-06 17:00 ` Peter Stephenson
2015-11-07 17:42   ` Peter Stephenson
2015-11-07 19:43     ` Bart Schaefer
2015-11-08 18:18       ` Peter Stephenson [this message]
2015-11-08 18:55         ` Bart Schaefer
2015-11-09  6:03           ` Bart Schaefer
2015-11-11 17:49         ` PATCH: nested ${(P)} (formerly SHWORDSPLIT and leading spaces) Peter Stephenson
2015-11-11 18:13           ` Bart Schaefer
2015-11-11 21:55           ` Peter Stephenson
2015-11-12  9:46             ` Peter Stephenson
2015-11-12 14:19               ` Peter Stephenson
2015-11-13  8:17                 ` Jun T.
2015-11-13 15:07                   ` Jun T.
2015-11-14  1:33                     ` Bart Schaefer
2015-11-14  9:45                       ` Peter Stephenson
2015-11-14 18:51                         ` Bart Schaefer

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=20151108181833.574cf0d6@ntlworld.com \
    --to=p.w.stephenson@ntlworld.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).