From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: <zsh-workers@zsh.org>
Subject: Re: PATCH Re: let unset array element remove compatible with bash
Date: Sun, 8 Jul 2012 18:50:30 +0100 [thread overview]
Message-ID: <20120708185030.4c40db16@pws-pc.ntlworld.com> (raw)
In-Reply-To: <120707100203.ZM6223@torch.brasslantern.com>
On Sat, 07 Jul 2012 10:02:03 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Jul 2, 10:11am, Peter Stephenson wrote:
> }
> } Hmm... I'd have said putting in an empty element in was the least
> } surprising thing to do, at least in the short term. I don't think
> } shifting an array so that the numbering is different mimics the ability
> } to have only certain elements set to any great degree, there are too
> } many other cases.
>
> OK, here's one more patch for this, which replaces both 30552 and 30557.
>
> Note that unsetting a slice of a scalar still deletes the slice, but it
> might in fact be possible to poke a Nularg in there instead and really
> have a 4-character string with a length of 5. On the other hand, it
> does not do sensible things to put a string-consisting-of-Nularg into
> an unset array element, because this causes the empty element to be
> retained when expanding ${array[*]} whereas the desired effect is to
> have an unset element disappear.
Thanks, shall we go with what you've got for now and think about extensions
later?
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
next prev parent reply other threads:[~2012-07-08 17:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAPg-njyehwyETKY4KGdFV8u_ZwkMku-G9xVi7d7PpU9rZhdPDA@mail.gmail.com>
2012-02-22 5:01 ` Bart Schaefer
2012-02-22 9:52 ` Peter Stephenson
2012-02-22 17:28 ` Bart Schaefer
2012-02-22 20:19 ` Peter Stephenson
2012-07-01 16:53 ` PATCH " Bart Schaefer
2012-07-01 18:15 ` Peter Stephenson
2012-07-01 22:23 ` Bart Schaefer
2012-07-02 9:11 ` Peter Stephenson
2012-07-07 17:02 ` Bart Schaefer
2012-07-08 17:50 ` Peter Stephenson [this message]
2012-07-01 22:29 ` Bart Schaefer
2012-07-02 7:36 ` Bart Schaefer
2012-02-23 10:58 ` Peter Stephenson
2012-02-23 16:23 ` 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=20120708185030.4c40db16@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).