This is the implemenation of envsubst discussed in #1756 Documentation update will follow after merge.