Is your feature request related to a problem? Please describe.
I can define an env var with prefix to prefix a path onto a :-separated PATH-like variable. However there's no convenience for prefixing onto other types of variables. In my case I want to add something to NIX_CONFIG, which is a newline-separated variable. And today I have to write this like
I'd like to have a separator option which I can set to something other than ":".
This also requires some way to disable the realpath invocation. That makes sense for PATH-like prefixing but not for other variables. One possibility here is to say "if you define the separator option it disables path expansion, even if you set it to ":"". This would allow my definition above to look like
With this I'd also like to be able to suffix the variable too, not just prefix. That is possibly useful for PATH-like variables too, although much less common, but e.g. in my case I'd prefer to suffix instead of prefix to ensure my definition actually works even if the inherited $NIX_CONFIG already tries to define the key.
Is your feature request related to a problem? Please describe.
I can define an env var with
prefix
to prefix a path onto a :-separated PATH-like variable. However there's no convenience for prefixing onto other types of variables. In my case I want to add something toNIX_CONFIG
, which is a newline-separated variable. And today I have to write this likeDescribe the solution you'd like
I'd like to have a
separator
option which I can set to something other than":"
.This also requires some way to disable the
realpath
invocation. That makes sense for PATH-like prefixing but not for other variables. One possibility here is to say "if you define theseparator
option it disables path expansion, even if you set it to":"
". This would allow my definition above to look likeDescribe alternatives you've considered
With this I'd also like to be able to suffix the variable too, not just prefix. That is possibly useful for PATH-like variables too, although much less common, but e.g. in my case I'd prefer to suffix instead of prefix to ensure my definition actually works even if the inherited
$NIX_CONFIG
already tries to define the key.