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

Feature suggestion: Add argument to allow a particular path to be excluded #11

Closed
wezm opened this issue Nov 21, 2020 · 6 comments
Closed
Labels
discussion enhancement New feature or request

Comments

@wezm
Copy link

wezm commented Nov 21, 2020

E.g. cargo wipe -w -e Projects/bar/target would preserve the Projects/bar/target directory. This would allow me to run cargo-wipe in me projects directory but skip deletion of a small number of projects.

@mihai-dinculescu
Copy link
Owner

This definitely sounds like a good thing to have, but I wonder, wouldn't it be better covered by #10 and #7?

@wezm
Copy link
Author

wezm commented Nov 24, 2020

I think my particular use case (which you are free to ignore) would be to periodically run cargo wipe in my Projects directory and I'd always want to exclude the same projects. Due to this I'd likely just rely on my shell history to re-run it: wipe ↑<Enter> The other proposals would not quite make this as easy or predictable.

@mihai-dinculescu mihai-dinculescu added the enhancement New feature or request label Nov 27, 2020
@mihai-dinculescu
Copy link
Owner

Ah, I see. I do agree that it makes sense to have it as a separate feature.

It's possible that it might integrate nicely in the future with #10. The interactive mode could come with a setting that stores the skipped folders in a file, and that file could then be used as an exclusion list. But this sounds like future, future stuff.

Coming back to the exclusion feature, I see three options that could be valuable:

  • individual excludes
cargo wipe -w -e Projects/foo/target -e Projects/foo/target -e Project/baz/target
  • path excludes
cargo wipe -w -e Projects
  • from file excludes
cargo wipe -w -e excludes.txt

Probably it makes sense to start with just the first two.

@wezm
Copy link
Author

wezm commented Nov 27, 2020

Probably it makes sense to start with just the first two.

Yep, the first one would work fine for what I'm trying to do.

@mihai-dinculescu
Copy link
Owner

I've started working on it.

@mihai-dinculescu
Copy link
Owner

Closing this as the main feature was shipped. The remaining work will be addressed in #16.

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

No branches or pull requests

2 participants