Closed Marathon2112 closed 1 year ago
I'm sorry, I don't understand your request.
Environment variables like $XDG_TEMPLATES_DIR
are already available in chezmoi's templates through the env
template function.
What changes do you want to see to chezmoi?
My apologies, I had not taken a look at all the sprig functions available. I guess one could then create a template for moving the files to their correct location using env "XDG_TEMPLATES_DIR"
.
Ah, storing files in different locations on different machines is a bit tricky at the moment. There's an FAQ entry with suggestions.
Hopefully this is now sorted (pending the #2273 enhancement, of course). Please re-open if needed.
A typical use case would be to back up templates in the XDG_TEMPLATES_DIR and deploy them on a machine with a different locale. The source directory could be
~/Templates
, whereas the destination directory could be, say,~/Modèles
. They are conceptually the same folder, butchezmoi
would create a~/Templates
folder on the second machine instead of using the correct locale.