Skip to content

chezmoi mv (new request) #4447

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

Open
tpsteiner opened this issue May 16, 2025 · 3 comments
Open

chezmoi mv (new request) #4447

tpsteiner opened this issue May 16, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@tpsteiner
Copy link

Following up on #3918

Is your feature request related to a problem? Please describe.

I frequently am moving my config files around and changing their names for xdg compliance and config overhauls. Eg. I had all of my neovim lsp lua files in folder ~/.config/nvim/lua/lsp but realized that nvim checks ~/.config/nvim/lsp, so i moved them. I also made changes to a bunch of plugins. When I did chezmoi re-add && chezmoi apply, I get the "...changes since chezmoi last wrote it?" dialogue for like 20 files. I select 'quit', then chezmoi managed | grep lua to find which files no longer apply, then chezmoi forget [filename], then chezmoi add [filename] for all the new files.

Describe the solution you'd like

That's a lot of work just to make a few simple changes to config files. Is my process flawed? Or am I missing a key function?

Additional context

I recognize that the previous feature request linked above was closed because the Owner thinks it's "a rare usecase." However, in my experience this has been a frequent usecase. I've had to do this four-step, manual process many times already. Mind you I am new to linux, and just started taking config files seriously. This has been a huge time sink and it makes me want to give up on chezmoi and just use git.

@tpsteiner tpsteiner added the enhancement New feature or request label May 16, 2025
@twpayne
Copy link
Owner

twpayne commented May 16, 2025

The reason that #3918 was closed is that it's really hard to implement this correctly.

See #3918 (comment).

You say that you're new to Linux and config files, so it's normal that it you're still working out where everything goes and so moving things around a lot. Once your config settles it does get better.

@devinbarry
Copy link

I have also had to move a lot of files and the process is a massive hassle. You do basically have to hack various bits of commands from chezmoi and linux together to forget an entire dir of files and then move them somewhere else. Its definitely not intuitive or documented

@halostatue
Copy link
Collaborator

I have also had to move a lot of files and the process is a massive hassle. You do basically have to hack various bits of commands from chezmoi and linux together to forget an entire dir of files and then move them somewhere else. Its definitely not intuitive or documented

We would welcome a documentation contribution for this, because I do not believe that this is something that can be programmed efficiently around given the number of moving parts. Since we're planning a cookbook/recipe section of the documentation (I was going to start this recently, but it turned out that the first thing I added was better documented in something that already exists rather than a new section entirely), I think that this would be a very good start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants