Re: feature request: ${@ command; } and ${* command; } funsubs to expand to all elements of the local array REPLY

Koichi Murase <[email protected]> Tue, 7 Apr 2026 09:08:37 +0900
Newsgroups gmane.comp.shells.bash.bugs
Message-ID <CAFLRLk-dwHJ+UzuoX=w3nxa31JUVaZfnAr1+FQxd2h6jBi6x_A@mail.gmail.com>
Thank you for your explanation.

2026年4月7日(火) 4:17 Chet Ramey <[email protected]>:
> > Or do you intend
> > to implement the array substitution to use a different variable name?
>
> I don't have any intentions yet.

If "array substitution" is going to be implemented in the future, my
preference is to use the same variable name, REPLY, in a similar way
as FUNCNAME and PROMPT_COMMAND were promoted from scalar variables to
indexed arrays. Then, one can use the same shell function to get the
first element by ${| fn; } or to get all elements by ${@ fn; } (or
whatever syntax).

--
Koichi