jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
8.15k stars 215 forks source link

implement more tera functions #2049

Open jdx opened 2 months ago

jdx commented 2 months ago

just has quite a few functions which is a good starting point for us to improve what can be done with templates in mise

tfh-cri commented 1 month ago

some equivalent to the tera built-in slugify would be useful (in my current need, adding a git-branch specific suffix to a python virtualenv managed by mise).

I assumed the tera builtin would already work, but looks like mise is using the

tera = { ..., default-features = false }

definition which removes various functions including slugify.

A haphazard local rebuild suggests default-features = true adds about 3MB to the final binary (23->26MB), so might be excessive for just that function.

jdx commented 1 month ago

I'd accept a pr to add that feature for sure

jdx commented 1 month ago

in fact all the default ones seem like they could be useful