Re: [PATCH] Add @R parameter transform to reverse expansion order
From:
Zachary Santer
Subject:
Re: [PATCH] Add @R parameter transform to reverse expansion order
Date:
Sun, 24 May 2026 19:37:11 -0400
On Mon, May 4, 2026 at 10:03 AM Chet Ramey <chet.ramey@case.edu> wrote:
>
> On 4/29/26 8:39 AM, Jackson Hansen wrote:
> > Implement the @R parameter transformation to reverse the order of
> > list-valued parameter expansions.
>
> Thanks for the proposal and implementation. I'll consider it for a
> future version of bash.
This would definitely see a fair bit of use. If you want to iterate
through array elements in reverse order, currently you're stuck using
an arithmetic for loop to iterate through their indices in reverse
order. Something I've done myself.