From: Mikael Magnusson <mikachu@gmail.com>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] Index of element after width of characters
Date: Wed, 28 Oct 2015 14:31:50 +0100 [thread overview]
Message-ID: <CAHYJk3Qzr6LEYMXXoHbTuiAqc8fadiP8A6uQyS77w3KkoDo7bQ@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVAffA-TBHtaCdcYhMnPpDFv26cnYjTFafYBL1ib=rJKXA@mail.gmail.com>
On Wed, Oct 28, 2015 at 12:38 PM, Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
> After thinking this through I would want to use "<", ",", ">". Could I
> allocate those symbols? Very mnemonic and nice, the use would be
> ${(<:10:)a}, ${(,:10:)a}, ${(>:10:)a} for index before width, index at
> width, index after width. I checked that they work with parser.
>
> PS. The code works in D07multibyte.ztst, so the tests issue is solved.
Wouldn't it make more sense to use syntax like $a[(y)10,-1] and
$a[1,(y)10] ? That's also less likely to trouble Bart since we only
have about 9 flags in that namespace. For example the (w) flag works
this way, making the number refer to words rather than characters in
the string.
--
Mikael Magnusson
next prev parent reply other threads:[~2015-10-28 13:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 17:18 Sebastian Gniazdowski
2015-10-27 19:41 ` Mikael Magnusson
2015-10-27 19:55 ` Sebastian Gniazdowski
2015-10-27 21:20 ` Bart Schaefer
2015-10-28 7:46 ` Sebastian Gniazdowski
2015-10-28 7:54 ` Sebastian Gniazdowski
2015-10-28 11:38 ` Sebastian Gniazdowski
2015-10-28 13:31 ` Mikael Magnusson [this message]
2015-10-28 15:46 ` Sebastian Gniazdowski
2015-10-28 15:59 ` Peter Stephenson
2015-10-28 16:37 ` Sebastian Gniazdowski
2015-10-28 23:07 ` Bart Schaefer
2015-10-29 9:42 ` 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=CAHYJk3Qzr6LEYMXXoHbTuiAqc8fadiP8A6uQyS77w3KkoDo7bQ@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=sgniazdowski@gmail.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).