Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Filtering array on index
- X-seq: zsh-users 23720
- From: Jesper Nygårds <jesper.nygards@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Filtering array on index
- Date: Thu, 25 Oct 2018 20:55:02 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=4SHsoOT+IZHfypY0ZJSe9Yegt1sza12poBWfVC91qTo=; b=nAyerqetZlgHiIqGwdmBjyQS7TUmO/hC+LgeY+sSGdf5fxbv0XAzDXs4MiMnJ7fYIh C50xO0ybfuIAuD2KZ4lMxHUWhAi87Z6JL87bRA0FxX5dPuHGGPF1GnJ4+ZUH359VTiGa ZzeWBHOcaNMNf+g39QQ0BH1UNeUeZsunTcUCNVTISXvy3SuUK3HC9UF8YXIezREohfW/ 9YuXsriSMy7Tb8KUWaH5OXFa8spfgYn0G81nJ5cYMqhX43aV3Qom3V5p9rOBuKS0ntFe JVguVW3f8k7mGbPIr3G4iSmcly9WKOODwipJEWnPeH1bl8mVxOvlHioYqnzj2NbsmpAt 7i8Q==
- In-reply-to: <CAHYJk3RTBfnx0KgDO87VCZx=p+QUot_Q57F3F2N+6A7b38ZcHQ@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CABZhJg80vQuMHGKABkzR1bdtt89Akpkfd8kWOV83N-qvqioaXw@mail.gmail.com> <CAHYJk3RTBfnx0KgDO87VCZx=p+QUot_Q57F3F2N+6A7b38ZcHQ@mail.gmail.com>
Thank you. Nice examples. I hadn't thought about order, and in fact it's
not a problem in my use case.
I guess I'll have resign myself to using a loop. I was dreaming along the
lines of "a[e:<index is odd>:]=()", but no luck.
Although I understand the reason why zparseopts is designed this way, I've
always found it a bit cumbersome that there is no way to only get the
arguments to a possibly repeated flag into an array.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author