Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(template): enable more tera builtin funcs/filters #2354

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 41 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ sys-info = "0.9.1"
tabled = { version = "0.15.0", features = ["ansi"] }
tar = "0.4.40"
tempfile = "3.10.1"
tera = "1.19"
tera = { version = "1.19", default-features=true }
terminal_size = "0.3.0"
thiserror = "1.0.59"
tokio = { version = "1.37.0", features = [
Expand Down
10 changes: 10 additions & 0 deletions e2e/cli/test_env_template_builtins
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

cat <<EOF >.mise.toml
[env]
ENV_TMPL_SLUGGY = "{{ 'Some.unslugified^thing' | slugify }}"
ENV_TMPL_SIZEFMT = "{{ '102400' | int | filesizeformat }}"
EOF

assert "mise env -s zsh | grep ENV_TMPL_SLUGGY" "export ENV_TMPL_SLUGGY=some-unslugified-thing"
assert "mise env -s zsh | grep ENV_TMPL_SIZEFMT" "export ENV_TMPL_SIZEFMT='100 kB'"
Loading