On 4/22/20 11:38 AM, Yann Ylavic wrote:
> I would like to be able to specify a default/fallback value for when
> an environment variable is not defined while loading the
> configuration, like the ${SOME_VAR-default} form in bash/shells.
> 
> In docker (mainly docker-compose) where quite some settings are passed
> to the container through env vars, this would be really useful for an
> httpd.conf "template" with default values for undefined vars.
> 
> I first thought of "<IfEnv [!]blah>" or alike, but it quickly becomes
> hard to read/follow, while e.g:
>     LogLevel "${LOG_LEVEL-info}"
> would be lovely :)
> 
> So would a patch like the attached be acceptable?
> It uses '-' as separator but any other char would do (if the minus
> sign is likely to break configuration where it shouldn't be
> interpreted), though that would look less like a shell expansion..

In general I am fine, but keep in mind that this also affects defines done via 
Define in the configuration file and people might
have used '-' in names there. So I guess another character should be used here.
And here we are in some sort of fun name discussion :-).

I open with

'@'
':'


Regards

RĂ¼diger

Reply via email to