mirror of
https://github.com/tw93/Mole.git
synced 2026-02-15 22:10:03 +00:00
chore: simplify dry run docs and change interactive shortcut to SPACE
This commit is contained in:
29
README.md
29
README.md
@@ -118,36 +118,7 @@ $ mole analyze ~/Downloads
|
|||||||
|
|
||||||
Items (sorted by size):
|
Items (sorted by size):
|
||||||
|
|
||||||
### Dry Run Preview
|
|
||||||
|
|
||||||
Before actually deleting, you can preview what would be removed:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mole clean --dry-run
|
|
||||||
```
|
|
||||||
|
|
||||||
In interactive menu: select Clean System and press `d` instead of Enter.
|
|
||||||
|
|
||||||
Sample output:
|
|
||||||
```bash
|
|
||||||
$ mole clean --dry-run
|
|
||||||
|
|
||||||
🧪 Dry Run mode: showing what would be removed (no deletions).
|
|
||||||
|
|
||||||
▶ System essentials
|
|
||||||
→ User app cache (45.2GB, dry)
|
|
||||||
→ User app logs (2.1GB, dry)
|
|
||||||
→ Trash (12.3GB, dry)
|
|
||||||
|
|
||||||
▶ Browser cleanup
|
|
||||||
→ Chrome cache (8.4GB, dry)
|
|
||||||
→ Safari cache (2.1GB, dry)
|
|
||||||
|
|
||||||
====================================================================
|
|
||||||
🧪 DRY RUN COMPLETE!
|
|
||||||
💾 Potential reclaimable space: 72.00GB (no changes made) | Free space now: 223.5GB
|
|
||||||
====================================================================
|
|
||||||
```
|
|
||||||
|
|
||||||
TYPE SIZE NAME
|
TYPE SIZE NAME
|
||||||
────────────────────────────────────────────────────────────────────────────────
|
────────────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
30
mole
30
mole
@@ -268,7 +268,22 @@ interactive_main_menu() {
|
|||||||
show_cursor
|
show_cursor
|
||||||
case $current_option in
|
case $current_option in
|
||||||
1)
|
1)
|
||||||
echo -e "${BLUE}Press 'd' for Dry Run preview, Enter to start cleaning (q to cancel)${NC}"
|
echo -e "${BLUE}Press SPACE for Dry Run preview, Enter to start cleaning (Esc/q to cancel)${NC}"
|
||||||
|
# SPACE => dry run; Enter => normal; Esc/q => cancel
|
||||||
|
IFS= read -r -s -n1 key2 || true
|
||||||
|
if [[ "$key2" == $'\e' ]]; then
|
||||||
|
# ESC pressed -> cancel
|
||||||
|
:
|
||||||
|
elif [[ "$key2" == ' ' ]]; then
|
||||||
|
exec "$SCRIPT_DIR/bin/clean.sh" --dry-run
|
||||||
|
elif [[ "$key2" == $'\n' || -z "$key2" ]]; then
|
||||||
|
exec "$SCRIPT_DIR/bin/clean.sh"
|
||||||
|
elif [[ "$key2" == 'q' || "$key2" == 'Q' ]]; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
exec "$SCRIPT_DIR/bin/clean.sh"
|
||||||
|
fi
|
||||||
|
continue
|
||||||
IFS= read -r -s -n1 key2 || true
|
IFS= read -r -s -n1 key2 || true
|
||||||
if [[ "$key2" == $'\n' || -z "$key2" ]]; then
|
if [[ "$key2" == $'\n' || -z "$key2" ]]; then
|
||||||
exec "$SCRIPT_DIR/bin/clean.sh"
|
exec "$SCRIPT_DIR/bin/clean.sh"
|
||||||
@@ -291,13 +306,16 @@ interactive_main_menu() {
|
|||||||
show_cursor
|
show_cursor
|
||||||
case $key in
|
case $key in
|
||||||
1)
|
1)
|
||||||
echo -e "${BLUE}Press 'd' for Dry Run preview, Enter to start cleaning (q to cancel)${NC}"
|
echo -e "${BLUE}Press SPACE for Dry Run preview, Enter to start cleaning (Esc/q to cancel)${NC}"
|
||||||
|
# SPACE => dry run; Enter => normal; Esc/q => cancel
|
||||||
IFS= read -r -s -n1 key2 || true
|
IFS= read -r -s -n1 key2 || true
|
||||||
if [[ "$key2" == $'\n' || -z "$key2" ]]; then
|
if [[ "$key2" == $'\e' ]]; then
|
||||||
exec "$SCRIPT_DIR/bin/clean.sh"
|
:
|
||||||
elif [[ "$key2" == "d" || "$key2" == "D" ]]; then
|
elif [[ "$key2" == ' ' ]]; then
|
||||||
exec "$SCRIPT_DIR/bin/clean.sh" --dry-run
|
exec "$SCRIPT_DIR/bin/clean.sh" --dry-run
|
||||||
elif [[ "$key2" == "q" || "$key2" == "Q" ]]; then
|
elif [[ "$key2" == $'\n' || -z "$key2" ]]; then
|
||||||
|
exec "$SCRIPT_DIR/bin/clean.sh"
|
||||||
|
elif [[ "$key2" == 'q' || "$key2" == 'Q' ]]; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
exec "$SCRIPT_DIR/bin/clean.sh"
|
exec "$SCRIPT_DIR/bin/clean.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user