Replies: 2 comments 6 replies
-
#2273 is the proper fix here. Unfortunately, I didn't foresee this requirement when I first wrote chezmoi. Implementing it correctly will require a re-work of chezmoi's internals that will be invisible to chezmoi's users but I have not had time to implement yet. If anyone feels like implementing this then implementing one direction ( |
Beta Was this translation helpful? Give feedback.
-
And what's the simplest way to check via chezmoi whether
and then I look whether the file ends with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the same file on different machines in different locations and for this I employed the power of templates (following this guide).
However, in everyday use I have some problems with templates: Say, I have set up templating for a file
file.conf
which sits either in.config/app/file.conf
or inLibrary/Application Support/App/file.conf
.In my normal work I don't think too much of chezmoi, so when I have to change settings for the program "app" I just change its config file
.config/app/file.conf
(assume I am now on linux).Then later I want to sync stuff between machines and I run
Of course I get alerted that
.config/app/file.conf
has changed. I look at the file and decide it looks great. Exactly as I want it! -In that moment I am not remembering that in chezmoi this file was setup via a template, so I just doI get no error, but
cz status
shows the file as still modified. That is good an bad:file.conf
and redo the changes there.All of this complication occurs for a file which only is in different locations, but else could be handled as one normal non-templated file.
Do I do everything right here? Or is there a better way to set this up? - Any suggestions appreciated!
Beta Was this translation helpful? Give feedback.
All reactions