zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: question of (C) and (s::)
Date: Sun, 30 Sep 2012 09:00:23 -0700	[thread overview]
Message-ID: <120930090023.ZM26333@torch.brasslantern.com> (raw)
In-Reply-To: <20120930073552.GC7385@localhost.localdomain>

On Sep 30,  3:35pm, Han Pingtian wrote:
}
} % x=foosbar;print ${(Cs:s:)x}
} Foo Bar
} 
} But in rules of parameter expansion flags, "case mofification" is the
} 11th, "forced splitting" is the 16th, so I think we should get "Foo bar"
} as the result here. Right? Or I'm missing something here? 

Hmm, I think "The Rules" have one thing out of place.

(f) and (s) and even the shell word splitting (both SH_WORD_SPLIT and
the '=' flag) are applied immediately after "forced joining".  The only
thing that's delayed until just before "uniqueness" is the (z) flag.

Either this changed at some point (entirely possible as several tweaks
have been made over the years to make SH_WORD_SPLIT behave more like
the original /bin/sh) or the code in subst.c was misread when the rules
were composed (the comment in subst.c explaining that the (z) section
doesn't have anything to do with (s) post-dates the rules).

So really 16 and 17 should be combined as 11 except that mention of (z)
should be removed from the new 11; the old 11 through 15 should be
renumbered 12 through 16; and 17 should be the (z) flag by itself.


  reply	other threads:[~2012-09-30 16:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-30  7:35 Han Pingtian
2012-09-30 16:00 ` Bart Schaefer [this message]
2012-10-02 13:31   ` Peter Stephenson
2012-10-18  6:20     ` Han Pingtian

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=120930090023.ZM26333@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@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).