Re: feature request: ${@ command; } and ${* command; } funsubs to expand to all elements of the local array REPLY
Chet Ramey <[email protected]> Mon, 6 Apr 2026 15:15:44 -0400
| Newsgroups | gmane.comp.shells.bash.bugs |
|---|---|
| Organization | ITS, Case Western Reserve University |
| Message-ID | <[email protected]> |
On 4/6/26 3:01 PM, Koichi Murase wrote: > 2026年4月7日(火) 0:01 Chet Ramey <[email protected]>: >> On 4/2/26 5:23 AM, Koichi Murase wrote: >>> I'm also interested in this. We already have some functions that >>> return an array through REPLY in bash-completion (see e.g. Ref. [1]). >> >> This doesn't depend on REPLY specifically and could just as easily use >> a different variable name. > > What do you mean? There is currently no special meaning associated with REPLY within a shell function. The fact that this is using REPLY is not demonstrative of anything besides the fact that it's using REPLY -- it could just as easily use $COMP_DEQUOTE or something else. > I meant that we already have functions assigning > results to REPLY as an array, so that the suggested "array > substitution" can be readily used with those functions. Ah, so your intent is that these functions would not have to change. Which is ok, but not really an argument for doing this one way or another. > If a function > uses "a different variable name" as you suggest, that function cannot > be used with array substitution, which is not useful. OK, you don't want the functions to change. > Or do you intend > to implement the array substitution to use a different variable name? I don't have any intentions yet. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
(application/pgp-signature, 203 B)
-----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCadQGYAUDAAAAAAAKCRC7WGnwZOp0q3l2 AKCA+N9Rrnw+yjfVu67I2lxlUUJC6QCeKM9dL/5BJud+Fiv5Xai2WDsvOLU= =isQR -----END PGP SIGNATURE-----