zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: On "the usual behaviour" of empty array elements
Date: Mon, 6 Aug 2012 17:04:59 +0100	[thread overview]
Message-ID: <20120806170459.6fbbb1af@pws-pc.ntlworld.com> (raw)
In-Reply-To: <120707103722.ZM6248@torch.brasslantern.com>

On Sat, 07 Jul 2012 10:37:22 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> A fairly recent addition to the doc for the (s::) parameter flag is this:
> 
>      For historical reasons, the usual behaviour that empty array
>      elements are retained inside double quotes is disabled for arrays
>      generated by splitting
> 
> The thing is, I can't find anywhere else that "the usual behavior" of
> empty array elements is even mentioned.
> 
> Far more interesting than the retention of empty array elements in double
> quotes, I think, is that empty array elements are NOT retained when the
> array parameter reference is NOT in quotes.
>
> Is there something I just haven't spotted?  I confess
> I merely searched the doc rather than re-read it cover to cover.

I should have replied to this...

I don't think I've ever searched, so it's quite possible it's just something
"everyone knows", except when they don't.  We should put something in
the parameter expansion section in any case.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


      parent reply	other threads:[~2012-08-06 16:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-07 17:37 Bart Schaefer
2012-08-05  7:09 ` Nikolai Weibull
2012-08-06 16:04 ` Peter Stephenson [this message]

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=20120806170459.6fbbb1af@pws-pc.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).