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

Interactive mode to preview and confirm deletions #5

Open
hkdobrev opened this issue Nov 27, 2024 · 3 comments
Open

Interactive mode to preview and confirm deletions #5

hkdobrev opened this issue Nov 27, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@hkdobrev
Copy link
Owner

No description provided.

@hkdobrev hkdobrev added enhancement New feature or request help wanted Extra attention is needed labels Nov 27, 2024
@kukumber
Copy link
Collaborator

Could you please provide more details on what you mean by "preview deletions"? Should the script prompt for confirmation before deleting each cache file, or do we need user confirmation before proceeding with each step (e.g., brew, Docker, Safari, etc.)?

@hkdobrev
Copy link
Owner Author

I think the ideal behaviour would be:

  • When run without flags, show what would be deleted and ask for a confirmation with y/n for each group of deletions.
  • Add a flag -y/--yes to bypass the confirmations and directly delete files for scripting.

What I mean by showing what would be deleted, I think it should be something like:

cleanmac.sh would delete files older than X days:
1GiB of System caches in `~/Library/Caches`. Proceed? Y/n
2GiB of Safari caches. Proceed? Y/n
...

If too complex/slow to calculate size for each, this part could be omitted, but I think this user experience would be ideal for first-time users.

@hkdobrev
Copy link
Owner Author

I've also included #8 in this as well.

What do you think?

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

No branches or pull requests

2 participants