Okay ~ $ foo= bar="" quux=$'\0' ~ $ declare -p foo bar quux declare -- foo="" declare -- bar="" declare -- quux=""
Name collisions in English are a very real issue, though. On Mon, Jul 28, 2025, 09:01 <bug-bash-requ...@gnu.org> wrote: > Send bug-bash mailing list submissions to > bug-bash@gnu.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.gnu.org/mailman/listinfo/bug-bash > or, via email, send a message with subject or body 'help' to > bug-bash-requ...@gnu.org > > You can reach the person managing the list at > bug-bash-ow...@gnu.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of bug-bash digest..." > > > Today's Topics: > > 1. Re: [bug #67358] Extra space in parameter expansion with > quoted strings and trailing $. (Chet Ramey) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 28 Jul 2025 10:51:18 -0400 > From: Chet Ramey <chet.ra...@case.edu> > To: Oğuz <oguzismailuy...@gmail.com>, bug-bash@gnu.org > Cc: chet.ra...@case.edu > Subject: Re: [bug #67358] Extra space in parameter expansion with > quoted strings and trailing $. > Message-ID: <297c0494-47ca-4ef3-a17a-cfea53649...@case.edu> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > On 7/28/25 4:29 AM, Oğuz wrote: > > On Sat, Jul 26, 2025 at 9:44 PM Greg Wooledge <g...@wooledge.org> wrote: > >> The quotation marks don't appear to matter, but > >> the trailing $ does. > > > > `$!' works as well, when there's no most recent asynchronous job: > > > > $ printf '<%s>\n' $(seq 3)$! > > <1 > > 2 > > 3> > > $ > > > > I think the problem is right here: > > > https://cgit.git.savannah.gnu.org/cgit/bash.git/tree/subst.c?h=devel#n11524 > > The function `param_expand' writes 0 to `*expanded_something' when > > `string' ends with `$' or `$!' and there's no async job, and bash > > forgets all the expansions it has done in that word. Maybe it was > > supposed to be called with the address of a local copy of > > `expanded_something'? There's a variable named `local_expanded' in > > that function that seems to be unused... > > Good catch, that is the right approach. > > Chet > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/ > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: OpenPGP_signature.asc > Type: application/pgp-signature > Size: 203 bytes > Desc: OpenPGP digital signature > URL: < > https://lists.gnu.org/archive/html/bug-bash/attachments/20250728/2a0a38bf/attachment.sig > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > bug-bash mailing list > bug-bash@gnu.org > https://lists.gnu.org/mailman/listinfo/bug-bash > > > ------------------------------ > > End of bug-bash Digest, Vol 272, Issue 47 > ***************************************** >