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

Allow minijinja-cli to read from a config file for options #597

Closed
onedr0p opened this issue Oct 14, 2024 · 0 comments · Fixed by #602
Closed

Allow minijinja-cli to read from a config file for options #597

onedr0p opened this issue Oct 14, 2024 · 0 comments · Fixed by #602

Comments

@onedr0p
Copy link
Contributor

onedr0p commented Oct 14, 2024

Hi 👋🏼

I was curious if you would find any benefit to use a config file in addition to args for minijinja-cli.

My use-case is I always want these args set --env --trim-blocks --lstrip-blocks --autoescape=none but having them be read from a config file instead would be awesome to I don't need to continue putting them in the CLI command.

So instead of running minijinja-cli --env --trim-blocks --lstrip-blocks --autoescape=none ... I could do the below:

Purposed CLI

minijinja-cli --config minininja.toml ...

Note: --config could be defaulted to minininja.toml if found so it could be even simpler by just running minijinja-cli ...

Purposed Config file

[minijinja]
env = true
trim_blocks = true
lstrip_blocks = true
autoescape = "none"

Thanks for this very useful tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant