Is it possible to use data from .chezmoidata in .chezmoi.toml.tmpl ? #4782
-
|
I'm pretty sure I saw discussions about this in the past, but I can't find one for this situation in my searches. Apologies if this has been beaten to death already. In the page about .chezmoidata/ and .chezmoidata.$FORMAT it states in the warning section below:
I have a data structure defined, where To my understanding, the template engine should be available in It results in the following error when I run
Was I expecting too much? I understand why .chezmoitemplates isn't participating, but I thought data, with its static nature, would be available. Stuff I've read, but didn't help me answer my question - click to expand |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
It was right where it should be, but it's been ages since I checked, and now I've revisited it, I see this has been answered. Plain and simple - NO
|
Beta Was this translation helpful? Give feedback.

While not possible to use chezmoi's built-in post-init templating context, the rest of the quote on the
.chezmoidatapages state:Below is an example of using fromYaml:
My
.chezmoidata/choices.yamlcontains:Dynamic loading (can be done in
.chezmoi.toml.tmpl).chezmoidataavailablility in the post-init template engine