Skip to content

Why are remove and private attributes mutually exclusive? #3415

Answered by twpayne
Mixaz017 asked this question in Q&A
Discussion options

You must be logged in to vote

For directories, remove_ declares that the directory should not exist. private_ declares that the directory should exist and its permissions should only be readable by the user. Since these declarations disagree on whether the directory should exist or not, they are mutually exclusive.

The purpose of the remove_ attribute is to make it easier to remove directory entries across multiple devices. Once the directory entry is removed from all of your devices you can remove the remove_ entry from your source state. You can also use a .chezmoiremove file.

If you want to avoid creating irrelevant files in the first place then use .chezmoiignore. For example, if you only want ~/.config/git/config

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@ernieIzde8ski
Comment options

@twpayne
Comment options

Answer selected by Mixaz017
Comment options

You must be logged in to vote
5 replies
@Lockszmith-GH
Comment options

@Mixaz017
Comment options

@Lockszmith-GH
Comment options

@twpayne
Comment options

@Mixaz017
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants