bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: declare -x non-exportable variable types


From: Léa Gris
Subject: Re: declare -x non-exportable variable types
Date: Fri, 25 Feb 2022 18:55:30 +0100
User-agent: Telnet/1.0 [tlh] (PDP11/DEC)

Le 25/02/2022 à 16:49, Chet Ramey écrivait :

You can't export array variables, period. You can't export attributes, only variable names and values. You still can't export attributes. There is no way to export attributes

Chet, I heard you, I understood it and I knew it before, while I was writing my message, and still now.

It feels like that you were either in a bad mood or that I didn't manage to express my remarks and thoughts as clearly as I would have liked.

I'm sorry for what happened and I didn't expect to receive such a tense reaction.

Now that you and I are, were and still are (I reassure you) in absolute agreement with: "Bash variable attributes and, or arrays are incompatible with environment variables" (undisputed fact)...

Is it possible that: if these variables are passed explicitly as environment variables with -x or export :

- Either Bash returns an error because of "variable flags are incompatible with the environment, and it's a mistake to export Bash variables with flags", rather than having different behaviours (pass value, nothing, name...) based on the original Bash variable flags/type?

- Or that Bash should now be able to "convert" the value as it does now, but in a more consistent way?

- Or that the documentation contains an explicit description of what happens when one tries to export a Bash variable with flags/types (even just documented as: "The result of exporting Bash variables with attributes is indeterminate"), which might be an appropriate clarification?


--
Léa Gris

reply via email to

[Prev in Thread] Current Thread [Next in Thread]