accessing vars in .chezmoitemplates/ #4897
-
|
docs on .chezmoitemplates states:
Yet later in same page, an example Why this discrepancy or am I misreading it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You're misreading it. Data is configured in chezmoi config: # ~/.config/chezmoi/chezmoi.toml
[data.alacritty.big]
fontsize = 18
font = "DejaVu Serif"
[data.alacritty.small]
fontsize = 12
font = "DejaVu Sans Mono"The template expects its parameters to be passed with # ~/.local/share/chezmoi/.chezmoitemplates/alacritty
some: config
fontsize: {{ .fontsize }}
font: {{ .font }}
more: configThen the template is used This results in the selection of |
Beta Was this translation helpful? Give feedback.
You're misreading it.
Data is configured in chezmoi config:
The template expects its parameters to be passed with
.fontsizeand.fontconfigurationThen the template is used
{{- template "alacritty".alacritty.small-}}.This results in the selection of
.alacritty.smallas the passed parameters, which have the.fontsizeand.fontkeys expected.