Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: RFC PATCH: Sketch at :@ subscripting
- X-seq: zsh-workers 48269
- From: Lawrence Velázquez <vq@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Cc: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- Subject: Re: RFC PATCH: Sketch at :@ subscripting
- Date: Sat, 27 Mar 2021 15:41:47 -0400
- Archived-at: <https://zsh.org/workers/48269>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-03/bb9c40f1-30a7-40fe-aba5-1d30f0856a08%40www.fastmail.com>
- In-reply-to: <20201218131815.25999-1-mikachu@gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20201218131815.25999-1-mikachu@gmail.com>
On Fri, Dec 18, 2020, at 8:18 AM, Mikael Magnusson wrote:
> As the subject says, this is in a very early idea stage, but it does
> work for basic cases at least.
>
> The idea is that you can do this:
> % typeset -a somearray=( 'data here' 'some words' etc etc 1 2 3 4 ) idx=(1 3 5)
> % echo ${somearray:@idx}
> data here etc 1
>
> The way it currently works also lets you do this:
> % typeset -a somearray=( 'data here' 'some words' etc etc 1 2 3 4 )
> idx=( '(r)<->' '(I)etc' )
> % echo ${somearray:@idx}
> 1 4
>
> Not decided on if that's desirable :).
Any further feedback on this?
vq
Messages sorted by:
Reverse Date,
Date,
Thread,
Author