Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: chezmoiignore exclude patterns #3098

Closed
2 of 3 tasks
torculus opened this issue Jul 17, 2023 · 1 comment · Fixed by #3103
Closed
2 of 3 tasks

Docs: chezmoiignore exclude patterns #3098

torculus opened this issue Jul 17, 2023 · 1 comment · Fixed by #3103
Labels
support Support request

Comments

@torculus
Copy link

What exactly are you trying to do?

I'd like to ignore all of the contents in ~/.config from syncing to Windows except for ~/.config/myspecialfile.txt. In the documentation, it gives an example of excluding f by using !f. Adapting to my use case, I've tried !.config/myspecialfile.txt, .config/!myspecialfile.txt, and !myspecialfile.txt. None of these have worked, as chezmoi ignored still says that ~/.config is ignored

If the docs could be updated to use something like file1.config instead of just f, this would make it a lot clearer for users on where to put the !

What have you tried so far?

My .chezmoiignore looks like this:

{{- if ne .chezmoi.os "windows" }}
AppData
_vimrc
vimfiles
{{ end }}
{{ if eq .chezmoi.os "windows" }} # things for Linux, FreeBSD, and illumos
.config
!.config/myspecialfile.txt # or .config/!myspecialfile.txt or !myspecialfile.txt
{{ end }}

Where else have you checked for solutions?

Output of any commands you've tried with --verbose flag

$ chezmoi --verbose $COMMAND

Output of chezmoi doctor

$ chezmoi doctor

Additional context

Add any other context about the problem here.

@twpayne
Copy link
Owner

twpayne commented Jul 18, 2023

Thanks, I've updated the docs in #3103.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
support Support request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants