coreutils
[Top][All Lists]
Advanced

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

Re: Feature Request: env -f to read from file


From: Pádraig Brady
Subject: Re: Feature Request: env -f to read from file
Date: Fri, 29 Mar 2024 11:23:38 +0000
User-agent: Mozilla Thunderbird

On 29/03/2024 05:05, Kaz Kylheku wrote:
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.

An interesting suggestion thanks.
Note env also has the -0 option, which might enable that mode?

Referencing the later thread for my previous thoughts on the subject:
https://lists.gnu.org/archive/html/coreutils/2022-01/msg00033.html

cheers,
Pádraig



reply via email to

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