You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Situation: I've made a bunch of (sometimes incompatible) changes to both source and destination files and is in the process of reconciliation with chezmoi apply -v --interactive
The first file: ok, I've added a few temporary changes and don't want to overwrite them, so I press n
next file: hm, don't remember these changes, so I quit chezmoi and do manual reconciliation, see diff in a better app, see the change history etc.
Ok, I restart the apply process: now the first file appears again and I have to ignore it again
And with many iterations of step 2 this becomes a bit tedious - and also risks a mistaken y overwrite on a file you wanted to skip
Describe the solution you'd like
Add an extra ignore command that will remember the modified times of the source/target files and unless any of those change won't suggest them again
Describe alternatives you've considered
Counting the number of ignored files to quickly press n # of times
Or sometimes I manually add a target path to the apply command to skip them, but then I have to do that for a few paths, so also a bit inconvenient (though chezmoi status helps generating a list)
Additional context
N/a
The text was updated successfully, but these errors were encountered:
This is an interesting idea, and I see the value and reasoning behind it.
I'm concerned that adding this ability will add hard-to-discover state which will lead to confusing behavior later. Specifically, if you tell chezmoi to ignore the file with its current contents, forget that you did this, and later try to update the file then it'll be confusing that chezmoi is skipping the file.
Instead, I'd recommend do this manually in your .chezmoiignore file, for example:
{{/* If .zshrc is known to be out of sync, then ignore it */}}
{{ if eq (joinPath .chezmoi.homeDir ".zshrc" | include | sha256sum) "a2a01e0ce4e34ff0975ce8a6fc5dc83901b1917ca5a87df502ce47e50e2df03d" }}
.zshrc
{{ end }}
The forgetfulness could be countered by forgetfulness :) - chezmoi could ony keep the ignore list for some X minutes (along with having a chezmoi forget command)
Otherwise your workaround seems rather cumbersome to add to many templates, and is also subject to forgetfulness - trying to remember the need to add this workaround the next time you enconter the issue instead of having a helpful selection option right there when you need it
Is your feature request related to a problem? Please describe.
Situation: I've made a bunch of (sometimes incompatible) changes to both source and destination files and is in the process of reconciliation with
chezmoi apply -v --interactive
n
And with many iterations of step 2 this becomes a bit tedious - and also risks a mistaken
y
overwrite on a file you wanted to skipDescribe the solution you'd like
Add an extra
ignore
command that will remember the modified times of the source/target files and unless any of those change won't suggest them againDescribe alternatives you've considered
Counting the number of ignored files to quickly press
n
# of timesOr sometimes I manually add a target path to the apply command to skip them, but then I have to do that for a few paths, so also a bit inconvenient (though
chezmoi status
helps generating a list)Additional context
N/a
The text was updated successfully, but these errors were encountered: