Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Index of element after width of characters
- X-seq: zsh-workers 37002
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- Subject: Re: [PATCH] Index of element after width of characters
- Date: Wed, 28 Oct 2015 14:31:50 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JWt6lXirMRIAaHG8+eq8AX7mFK+5lnEFWltohCnQNM0=; b=Y9XusBRnjYV8gXF658gedKjLjQi/XqrUYZZrfKq9fs+zNT5yRRKewjOzQBGfLNo42J TRCRnEH1GgSvrVKXHav4Xi8mCAI75SwBg08n81Wm1vUbLZpQr2ZvgsB90QZqqk6q6AMH qPgW8GdK+0adtPeQn9Lav/TLCvjw8CJwDKc1o6jnUL+jLnFn75ZPToLItzftYt0tzQQn S62u+aQBQwIKwMkumxheQ4ijtschRwMbO8hxwC8Bymk8kN3bfB6gS/snbX/ppD+xdutm sDkJDg5HWNZmRcc3XjGAkfp5jtJQFurlt8YgUKH4qVtgHbANmC0uY0Vn1OnYkux74kMl xmsw==
- In-reply-to: <CAKc7PVAffA-TBHtaCdcYhMnPpDFv26cnYjTFafYBL1ib=rJKXA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVC4LFGnBJau3gWuws3bTgc+zcnEE+o-B8ZmKEEWa8Kpog@mail.gmail.com> <CAH+w=7b1RQDPWw0u7NSDs9wdxC-rCQYvyXadKCd1pdNXEdFuXA@mail.gmail.com> <CAKc7PVCGFJSZbiHDpJHivFco8J3SfHDesdjJoTzAY-sR4K5++w@mail.gmail.com> <CAKc7PVD=H+e9tyrVSM-TbwzFjKs=cAygNC0yzkO=uuNFEH7PjQ@mail.gmail.com> <CAKc7PVAffA-TBHtaCdcYhMnPpDFv26cnYjTFafYBL1ib=rJKXA@mail.gmail.com>
On Wed, Oct 28, 2015 at 12:38 PM, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author