coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] env: new option '-f/--file' to load variables from file


From: Pádraig Brady
Subject: Re: [PATCH] env: new option '-f/--file' to load variables from file
Date: Sun, 16 Jan 2022 14:50:55 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Thunderbird/95.0

On 09/10/2021 12:38, Matthias de Clerk wrote:
Thanks! I hope some users will find this feature handy.

Let me know if I can help.

I still think the feature is useful.

There are some issues in the implementation though,
specifically in the syntax supported in the file

 - It's not general, as no support for explicit $, \n
 - It's not general, as can't append blah in $VARblah
 - It diverges from the syntax supported in -S

All this would be addressed by just reusing the escape
and interpolation syntax supported by the -S option.
I.e. only support curly brackets for interpolation,
and support \$, \n etc.
Note that also more generally/simply uses getenv()
to do the lookup rather than reimplementing.

cheers,
Pádraig



reply via email to

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