On 2024-03-28 15:29, Balakrishnan Balasubramanian wrote:
> On 2024-03-28 3:38 p.m., Pádraig Brady wrote:
>> Yes the feature has merit, and was previously discussed at:
>> https://lists.gnu.org/archive/html/coreutils/2021-10/msg00001.html
>> There are some subtleties to consider though.
>
> Indeed there are subtleties to consider. Thank you pointing previous
> discussion.
> For the first revision, it can be stricter but leave room for improved
> features later without breaking backwards compatibility.
>
> 1. Support empty lines comments in separate lines.
>
> <optional whitespace># comment text
In my opinion, the file should have exactly the same format as /proc/environ on
Linux.
env-file := { var-name '=' { non-null-byte } * '\0'} *
I.e. we already have a widely used data format in which environments are
represented as files, albeit virtual ones.
No need to invent anything.
> 4. Literal backslah (\) should be escaped. Otherwise error
No escaping nonsense. Null termination is all the escape you need.