I have the use case, that I wan't to do some sort of defaulting mechanism. Eg. how envsubst does it ${variable:-"default"}. I was wondering if that's possible with spruce as well? Looking at the operators I don't think one of these is intended to be use like this. A grab fails if a value is not in the structure. But i would like to "handle" that case:
(( default "" $.ctx.proxy ))
Maybe it would even be possible to do nested defaults.
Hi, love using Spruce :heart:
I have the use case, that I wan't to do some sort of defaulting mechanism. Eg. how envsubst does it
${variable:-"default"}
. I was wondering if that's possible with spruce as well? Looking at the operators I don't think one of these is intended to be use like this. Agrab
fails if a value is not in the structure. But i would like to "handle" that case:Maybe it would even be possible to do nested defaults.
WDYT?