Re: New word splitting semantics for kvpair compound assignment

Zachary Santer <[email protected]>
Newsgroups gmane.comp.shells.bash.bugs
Message-ID <CABkLJUJim0x_GRv9OnHFmDnDgV5WOsZVA5hTAftYdx2Xmo4xeQ@mail.gmail.com>
On Fri, Aug 21, 2026 at 8:50 AM Chet Ramey <[email protected]> wrote:
>
> On 8/21/26 7:49 AM, Zachary Santer wrote:
> >
> > The manual doesn't list -a and -A as valid options for the export command.
>
> It doesn't seem worth it, since you can't put them in the environment,
> does it?

I'm with you there, but I think the command should at least print a
warning when it's provided an indexed or associative array as an
argument.

I assume POSIX is telling you that all the declaration commands need
to get the same special treatment by the parser, which means the
parser is recognizing the -a and -A options. If it were me, I'd still
have export error out and not have the variable assignment(s) persist.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.