deadc0de6 / dotdrop

Save your dotfiles once, deploy them everywhere
https://dotdrop.readthedocs.io
GNU General Public License v3.0
1.77k stars 105 forks source link

[feature] ability to clean up real things #403

Closed lictw closed 8 months ago

lictw commented 10 months ago

Hello!

First of all - thanks for the great tool! It's really the most feature-rich dotfiles manager for multi-ricing/overlaying: keeping bases/common things, patching them and extending in the rices etc., patching from other files, other repositories, any case can be implemented and I really like it!

But dotdrop misses some things for clean up dotfiles after another rice or experiment:

  1. Way to delete all files belongs to profile or just a ability to delete files of some dotfile (without changing things in dotdrop, just clean up real things), may be with some filtering or advanced logic.
  2. Ability to delete all not managed files/directories in dotfile if it's directory, now we only see warnings about this files and must delete them manually.
deadc0de6 commented 10 months ago

Hello, thanks! Happy you like dotdrop and it's useful to you :+1:

Since we have all information in the config file, I think that's doable. It would be a new command (something like uninstall) and remove everything that was installed by dotdrop.

Regarding the ability to remove non-managed files in a known dotfile, I would however suggest adding an option to install so that you can force, as part of installing a dotfile, remove any other files present. What do you think?

lictw commented 10 months ago

Yep, I thinks it's nice!

deadc0de6 commented 10 months ago

Ok cool, I'll work on this and keep you posted

deadc0de6 commented 9 months ago

@lictw I have something for you:

You can test a branch using the doc here.

I would be thankful if you could test the above two with your setup (since it seems you'd make good use of it). Thanks a lot for your help!

deadc0de6 commented 8 months ago

@lictw the two branches have been merged into master. Both features are now available: