litefs icon indicating copy to clipboard operation
litefs copied to clipboard

Advanced Variable Expansion

Open benbjohnson opened this issue 1 year ago • 2 comments

Per suggestion from @kentcdodds, this issue exists to describe additional operators in variable expansion.

The initial suggestion is for a "includes" operator. Environment variables don't necessarily have a format (e.g. CSV) so it might make more sense to have a CONTAINS operator instead.

Usage

Possible formats for usage:

${"den,maa" CONTAINS FLY_REGION}
${CONTAINS("den,maa", FLY_REGION)}

Alternatives

Another option could be to implement a regex operator to make it more flexible:

${"den,maa" ~= FLY_REGION}

Maybe that's more confusing though. ¯\_(ツ)_/¯

benbjohnson avatar Nov 13 '22 17:11 benbjohnson