I would love it if spruce could refer to env variables using not only $VAR_NAME but also other prefixes (which could be fixed or passed as an option from CMD.
Use-case:
I use spruce extensively on CI environments to produce configurations dynamically.
In cases when spruce configurations are passed around inside CI, it is not always possible to disable variable expansion. Sometimes I even want some parts to be expanded while others should remain unexpanded - specifically spruce operators like (( grab $VAR_NAME )).
If it would be possible to define alternative prefixes that would not trigger shell expansion by themselves, it would've been great!
So ideally I would want to see an option to define a list of prefixes to use like:
spruce --env-prefixes="%,$,@" ...
or just support for alternative prefixes - % and @ as potential options.
so that following spruce operators perform identically:
Hi there.
I would love it if spruce could refer to env variables using not only
$VAR_NAME
but also other prefixes (which could be fixed or passed as an option from CMD.Use-case:
I use spruce extensively on CI environments to produce configurations dynamically.
In cases when spruce configurations are passed around inside CI, it is not always possible to disable variable expansion. Sometimes I even want some parts to be expanded while others should remain unexpanded - specifically spruce operators like
(( grab $VAR_NAME ))
.If it would be possible to define alternative prefixes that would not trigger shell expansion by themselves, it would've been great!
So ideally I would want to see an option to define a list of prefixes to use like:
or just support for alternative prefixes -
%
and@
as potential options.so that following spruce operators perform identically: