From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org (Zsh hackers list)
Subject: Re: PATCH: bash-style substrings & subarrays
Date: Sun, 21 Nov 2010 17:02:38 +0000 [thread overview]
Message-ID: <201011211702.oALH2ci6003141@pws-pc.ntlworld.com> (raw)
In-Reply-To: Your message of "Sat, 20 Nov 2010 22:34:01 PST." <101120223401.ZM6950@torch.brasslantern.com>
Bart Schaefer wrote:
> } I don't think half-measures compatibility with other shells is
> } particularly useful, in the end is probably more confusing when you
> } find some things work the way you expect and some things don't.
>
> I'm confused about how that relates to the foregoing, sorry ...?
If KSH_ARRAYS is not set, lots of aspects of arrays don't work in a
fashion consistent with other shells, so the fact that one feature you
chanced upon does so, doesn't help you write scripts properly. If you
want proper compatibility you need a full emulation.
This doesn't impinge on the argument for saying the newly imitated
syntax only deals with offsets and for that reason shouldn't be affected
by KSH_ARRAYS, however. I'd be happy to get any other views. Should
${foo:1} always start 1 character/element beyond the first one,
regardless which subscripting rules are in use? I'm now inclining in
that direction.
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
next prev parent reply other threads:[~2010-11-21 17:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-17 16:54 Peter Stephenson
2010-11-18 12:44 ` Peter Stephenson
2010-11-19 18:01 ` Bart Schaefer
2010-11-20 21:15 ` Peter Stephenson
2010-11-21 6:34 ` Bart Schaefer
2010-11-21 17:02 ` Peter Stephenson [this message]
2010-11-21 20:11 ` Bart Schaefer
2010-11-21 20:51 ` Greg Klanderman
2010-11-23 11:14 ` Peter Stephenson
2010-11-25 10:35 ` Peter Stephenson
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=201011211702.oALH2ci6003141@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).