zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: PATCH: nested ${(P)} (formerly SHWORDSPLIT and leading spaces)
Date: Sat, 14 Nov 2015 09:45:17 +0000	[thread overview]
Message-ID: <f6164db7-fc34-4bee-b353-197626b51909@email.android.com> (raw)
In-Reply-To: <151113173324.ZM393@torch.brasslantern.com>

On 14 Nov 2015 01:33, Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> On Nov 14, 12:07am, Jun T. wrote: 
> } 
> } It seems ${${(Pr.n.)name}} is behaving like ${(P)${(r.n.)name}}. 
> } Instead, the expected behavior may be ${(r.n.)${(P)name}}. 
>
> Yes, that definitely seems to be the issue.

(On my mobile at the moment so lacking in linr breaks.) 

Sorry, I obviously didn't explain the change properly.  The new behaviour is both expected and necessary to have the clean separation between levels of nesting: if a (P)  occurs inside multiple braces, the immediately surrounding level deals with the parameter name, and the outer level deals with the value. That's the only way to implement this in a workable fashion. If the old kludge where it's mixed together is needed for compatibility, we'll need to go back to the old state (and leave it permanently - it is not compatible with a properly nested form of the (P)  flag). Or, of course, we can update the documentation, or, yuk, use a different flag and deprecate the old one.

pws

  reply	other threads:[~2015-11-14  9:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 10:54 Inconsistency with SHWORDSPLIT and leading spaces 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
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 [this message]
2015-11-14 18:51                         ` Bart Schaefer
     [not found] <0faa0ee3-303a-4cb5-a270-d3d1787accf1@email.android.com>
2015-11-15  5:14 ` 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=f6164db7-fc34-4bee-b353-197626b51909@email.android.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=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).